ubuntu安装/卸载mysql

1.安装mysql

root@openstack001:/tmp# apt-get install mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libaio1 mysql-server-5.5 mysql-server-core-5.5
Suggested packages:
tinyca mailx
The following NEW packages will be installed:
libaio1 mysql-server mysql-server-5.5 mysql-server-core-5.5
upgraded, newly installed, to remove and not upgraded.
Need to get B/, kB of archives.
After this operation, 53.2 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Preconfiguring packages ...
Selecting previously unselected package libaio1:amd64.
(Reading database ... files and directories currently installed.)
Preparing to unpack .../libaio1_0.3.109-4_amd64.deb ...
Unpacking libaio1:amd64 (0.3.-) ...
Selecting previously unselected package mysql-server-core-5.5.
Preparing to unpack .../mysql-server-core-.5_5.5.53-0ubuntu0.14.04.1_amd64.deb ...
Unpacking mysql-server-core-5.5 (5.5.-0ubuntu0.14.04.) ...
Selecting previously unselected package mysql-server-5.5.
Preparing to unpack .../mysql-server-.5_5.5.53-0ubuntu0.14.04.1_amd64.deb ...
Unpacking mysql-server-5.5 (5.5.-0ubuntu0.14.04.) ...
Selecting previously unselected package mysql-server.
Preparing to unpack .../mysql-server_5.5.53-0ubuntu0.14.04.1_all.deb ...
Unpacking mysql-server (5.5.-0ubuntu0.14.04.) ...
Processing triggers for man-db (2.6.7.1-) ...
Processing triggers for ureadahead (0.100.-) ...
Setting up libaio1:amd64 (0.3.-) ...
Setting up mysql-server-core-5.5 (5.5.-0ubuntu0.14.04.) ...
Setting up mysql-server-5.5 (5.5.-0ubuntu0.14.04.) ...
:: [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
:: [Note] Ignoring --secure-file-priv value as server is running with --bootstrap.
:: [Note] /usr/sbin/mysqld (mysqld 5.5.-0ubuntu0.14.04.) starting as process ...
mysql start/running, process
Processing triggers for ureadahead (0.100.-) ...
Setting up mysql-server (5.5.-0ubuntu0.14.04.) ...
Processing triggers for libc-bin (2.19-0ubuntu6) ...
root@openstack001:/tmp#

2.查看mysql信息

root@openstack001:/tmp# dpkg -l | grep mysql
ii libdbd-mysql-perl 4.025-1ubuntu0. amd64 Perl5 database interface to the MySQL database
ii libmysqlclient18:amd64 5.5.-0ubuntu0.14.04. amd64 MySQL database client library
ii mysql-client 5.5.-0ubuntu0.14.04. all MySQL database client (metapackage depending on the latest version)
ii mysql-client-5.5 5.5.-0ubuntu0.14.04. amd64 MySQL database client binaries
ii mysql-client-core-5.5 5.5.-0ubuntu0.14.04. amd64 MySQL database core client binaries
ii mysql-common 5.5.-0ubuntu0.14.04. all MySQL database common files, e.g. /etc/mysql/my.cnf
ii mysql-server 5.5.-0ubuntu0.14.04. all MySQL database server (metapackage depending on the latest version)
ii mysql-server-5.5 5.5.-0ubuntu0.14.04. amd64 MySQL database server binaries and system database setup
ii mysql-server-core-5.5 5.5.-0ubuntu0.14.04. amd64 MySQL database server binaries
root@openstack001:/tmp#

3.卸载mysql

root@openstack001:/tmp# apt-get autoremove --purge mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
yThe following packages will be REMOVED:
libaio1* mysql-server* mysql-server-5.5* mysql-server-core-5.5*
upgraded, newly installed, to remove and not upgraded.
After this operation, 53.2 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... files and directories currently installed.)
Removing mysql-server (5.5.-0ubuntu0.14.04.) ...
Removing mysql-server-5.5 (5.5.-0ubuntu0.14.04.) ...
mysql stop/waiting
Purging configuration files for mysql-server-5.5 (5.5.-0ubuntu0.14.04.) ...
Removing mysql-server-core-5.5 (5.5.-0ubuntu0.14.04.) ...
Removing libaio1:amd64 (0.3.-) ...
Purging configuration files for libaio1:amd64 (0.3.-) ...
Processing triggers for man-db (2.6.7.1-) ...
Processing triggers for libc-bin (2.19-0ubuntu6) ...
上一篇:java学习笔记(基础篇)—面向对象编程之封装、继承、多态


下一篇:原创:CSS3技术-雪碧图自适应缩放与精灵动画方案