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) ...

ubuntu安装/卸载mysql的更多相关文章

  1. ubuntu彻底卸载mysql并且重新安装

    环境: root@ubuntu:/usr/local/mysql/data# uname -a Linux ubuntu 4.4.0-87-generic #110-Ubuntu SMP Tue Ju ...

  2. Ubuntu 彻底卸载 MySQL 数据库

    Ubuntu 18.04 彻底卸载MySQL 5.7.31 1. 查看MySQL的依赖项 dpkg --list|grep mysql 2. 卸载 mysql-common sudo apt remo ...

  3. Ubuntu安装卸载anaconda

    安装要点: 1.在Anaconda官网https://www.continuum.io/downloads内下载需要的版本: 2.打开终端--进入下载安装包所在的文件夹(cd 文件名)--输入命令:b ...

  4. ubuntu安装了mysql 但是编译报错 mysql.h: No such file or directory

    在Ubuntu体系中,已经安装了mysql,即应用sudo apt-get install mysql-server mysql-client 但是用C编译mysql数据库时,报错fatal erro ...

  5. linux安装卸载MySQL以及密码设置+Hive测试

    linux系统卸载MYSQL 1,先通过yum方式卸载mysql及相关组件 命令:yum remove mysql* 2.通过命令:rpm -qa|grep -i mysql 查找系统的有关于mysq ...

  6. linux安装/卸载mysql

    其实安装mysql差不多有10次了吧, 但是每次都有坑,各种百度,太麻烦了,所以这次把坑给记录下来,下次直接用. 1. 去官网下载mysql.这里可以使用wget下载.先去官方网站,找到mysql5. ...

  7. 树莓派3B+安装&卸载mysql

    需求 在树莓派上 安装Mysql 服务,并开启远程访问 步骤 安装 mysql server 1 $ sudo apt-get install mysql-server 我以为中间会让我提示输入 数据 ...

  8. Ubuntu 完全卸载MySQL 重装步骤

    sudo rm /var/lib/mysql/ -R 删除mysql的数据文件   sudo rm /etc/mysql/ -R 删除mqsql的配置文件   sudo apt-get autorem ...

  9. ubuntu 安装apache2,mysql,php5,phpmyadmin等软件

    1.安装apache2  sudo apt-get install apache2  输入Y回车  apache2 安装完成  检测:在浏览器输入localhost 出现It works则成功. 2. ...

随机推荐

  1. Windows Server 2012 虚拟化实战:存储(二)

    五.搭建Window Server 2012虚拟化的存储网络 前文我们讨论了Window Server 2012支持的各种与存储相关的技术,接下来我们通过实践对其中的一些技术进行检验.实际上Windo ...

  2. Geeklink引领智慧新生活!

    煤油灯成为古董,管道天然气进入厨房,电脑挤进生活,手机代替书信成为通讯的主要工具-这些变化无不提醒我们,时代在变迁,科技在发展.而最近朋友圈和电视又在播报智能家居的生活方式-智能家电能实现怎样的情景功 ...

  3. PHP核心技术与最佳实践——全局浏览

    难得买到并喜欢一本好书,‘PHP核心技术与最佳实践’. 几天时间,先看了个大概,总结一下整体是什么样子的,怎么看怎么学. 1.总共14章: 2.第1.2章讲PHP的OOP: 其中第一章侧重于PHP的O ...

  4. 前端之jquery

    前端之jquery 本节内容 jquery简介 选择器和筛选器 操作元素 示例 1. jquery简介 1 jquery是什么 jQuery由美国人John Resig创建,至今已吸引了来自世界各地的 ...

  5. Java开发的几个注意点

    原文出处: 后端技术杂谈 1. 将一些需要变动的配置写在属性文件中 比如,没有把一些需要并发执行时使用的线程数设置成可在属性文件中配置.那么你的程序无论在DEV环境中,还是TEST环境中,都可以顺畅无 ...

  6. webgl画个点

    function main(){ var canvas = document.getElementById("webgl"); var gl = getWebGLContext(c ...

  7. Java GC系列

    一个国外站点的Java JVM调优系列 下面是国内站点翻译的 http://www.importnew.com/1993.html

  8. CWMP开源代码研究5——CWMP程序设计思想

    声明:本文涉及的开源程序代码学习和研究,严禁用于商业目的. 如有任何问题,欢迎和我交流.(企鹅号:408797506) 本文介绍自己用过的ACS,其中包括开源版(提供下载包)和商业版(仅提供安装包下载 ...

  9. python2.7高级编程 笔记二(Python中的描述符)

    Python中包含了许多内建的语言特性,它们使得代码简洁且易于理解.这些特性包括列表/集合/字典推导式,属性(property).以及装饰器(decorator).对于大部分特性来说,这些" ...

  10. [LeetCode] Minimum Moves to Equal Array Elements II 最少移动次数使数组元素相等之二

    Given a non-empty integer array, find the minimum number of moves required to make all array element ...