CentOS下如何完全卸载MySQL
CentOS下如何完全卸载MySQL?解决卸载不干净的问题
系统:CentOS 6.5,MySQL:MySql 5.6
这里主要解决使用rpm安装的卸载问题,安装方法见:CentOS安装mysql*.rpm提示conflicts with file from package的解决办法
虽然说这里的是使用rpm安装的卸载问题,我觉得使用yum方式安装的如果遇到相同的问题也一样适用。
查看已经安装的服务
rpm –qa|grep -i mysql
-i 作用是不区分大小写
可以看到有两个安装包
MySQL-server-5.6.19-1.linux_glibc2.5.x86_64.rpm
MySQL-client-5.6.19-1.linux_glibc2.5.x86_64.rpm
删除这两个服务(去掉后缀)
rpm –e MySQL-client-5.6.19-1.linux_glibc2.5.x86_64
rpm -e MySQL-server-5.6.19-1.linux_glibc2.5.x86_64
查看残留的目录:
whereis mysql
然后删除mysql目录:
rm –rf /usr/lib64/mysql
删除相关文件:
rm –rf /usr/my.cnf
rm -rf /root/.mysql_sercret
最关键的:
rm -rf /var/lib/mysql
如果这个目录如果不删除,再重新安装之后,密码还是之前的密码,不会重新初始化!
网上查了很久都没有文章提到这个,最后还是自己摸索找出来的。
卸载完成!怎么确定是不是真的卸载干净了呢?
一是看安装输出:
如果没有卸载干净,安装server时输入只有两行:
- [root@localhost opt]# rpm -ivh MySQL-server-5.6.19-1.linux_glibc2.5.x86_64.rpm
- Preparing... ########################################### [100%]
- 1:MySQL-server ########################################### [100%]
卸载干净了安装输入如下:
- [root@localhost opt]# rpm -ivh MySQL-server-5.6.19-1.linux_glibc2.5.x86_64.rpm
- Preparing... ########################################### [100%]
- 1:MySQL-server ########################################### [100%]
- 2014-09-23 07:22:43 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
- 2014-09-23 07:22:43 26041 [Note] InnoDB: Using atomics to ref count buffer pool pages
- 2014-09-23 07:22:43 26041 [Note] InnoDB: The InnoDB memory heap is disabled
- 2014-09-23 07:22:43 26041 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
- 2014-09-23 07:22:43 26041 [Note] InnoDB: Compressed tables use zlib 1.2.3
- 2014-09-23 07:22:43 26041 [Note] InnoDB: Using Linux native AIO
- 2014-09-23 07:22:43 26041 [Note] InnoDB: Using CPU crc32 instructions
- 2014-09-23 07:22:43 26041 [Note] InnoDB: Initializing buffer pool, size = 128.0M
- 2014-09-23 07:22:43 26041 [Note] InnoDB: Completed initialization of buffer pool
- 2014-09-23 07:22:43 26041 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
- 2014-09-23 07:22:43 26041 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
- 2014-09-23 07:22:43 26041 [Note] InnoDB: Database physically writes the file full: wait...
- 2014-09-23 07:22:43 26041 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB
- 2014-09-23 07:22:43 26041 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB
- 2014-09-23 07:22:45 26041 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
- 2014-09-23 07:22:45 26041 [Warning] InnoDB: New log files created, LSN=45781
- 2014-09-23 07:22:45 26041 [Note] InnoDB: Doublewrite buffer not found: creating new
- 2014-09-23 07:22:45 26041 [Note] InnoDB: Doublewrite buffer created
- 2014-09-23 07:22:45 26041 [Note] InnoDB: 128 rollback segment(s) are active.
- 2014-09-23 07:22:45 26041 [Warning] InnoDB: Creating foreign key constraint system tables.
- 2014-09-23 07:22:45 26041 [Note] InnoDB: Foreign key constraint system tables created
- 2014-09-23 07:22:45 26041 [Note] InnoDB: Creating tablespace and datafile system tables.
- 2014-09-23 07:22:45 26041 [Note] InnoDB: Tablespace and datafile system tables created.
- 2014-09-23 07:22:45 26041 [Note] InnoDB: Waiting for purge to start
- 2014-09-23 07:22:45 26041 [Note] InnoDB: 5.6.19 started; log sequence number 0
- A random root password has been set. You will find it in '/root/.mysql_secret'.
- 2014-09-23 07:22:46 26041 [Note] Binlog end
- 2014-09-23 07:22:46 26041 [Note] InnoDB: FTS optimize thread exiting.
- 2014-09-23 07:22:46 26041 [Note] InnoDB: Starting shutdown...
- 2014-09-23 07:22:48 26041 [Note] InnoDB: Shutdown completed; log sequence number 1625977
- 2014-09-23 07:22:48 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
- 2014-09-23 07:22:48 26065 [Note] InnoDB: Using atomics to ref count buffer pool pages
- 2014-09-23 07:22:48 26065 [Note] InnoDB: The InnoDB memory heap is disabled
- 2014-09-23 07:22:48 26065 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
- 2014-09-23 07:22:48 26065 [Note] InnoDB: Compressed tables use zlib 1.2.3
- 2014-09-23 07:22:48 26065 [Note] InnoDB: Using Linux native AIO
- 2014-09-23 07:22:48 26065 [Note] InnoDB: Using CPU crc32 instructions
- 2014-09-23 07:22:48 26065 [Note] InnoDB: Initializing buffer pool, size = 128.0M
- 2014-09-23 07:22:48 26065 [Note] InnoDB: Completed initialization of buffer pool
- 2014-09-23 07:22:48 26065 [Note] InnoDB: Highest supported file format is Barracuda.
- 2014-09-23 07:22:48 26065 [Note] InnoDB: 128 rollback segment(s) are active.
- 2014-09-23 07:22:48 26065 [Note] InnoDB: Waiting for purge to start
- 2014-09-23 07:22:48 26065 [Note] InnoDB: 5.6.19 started; log sequence number 1625977
- 2014-09-23 07:22:48 26065 [Note] Binlog end
- 2014-09-23 07:22:48 26065 [Note] InnoDB: FTS optimize thread exiting.
- 2014-09-23 07:22:48 26065 [Note] InnoDB: Starting shutdown...
- 2014-09-23 07:22:50 26065 [Note] InnoDB: Shutdown completed; log sequence number 1625987
- A RANDOM PASSWORD HAS BEEN SET FOR THE MySQL root USER !
- You will find that password in '/root/.mysql_secret'.
- You must change that password on your first connect,
- no other statement but 'SET PASSWORD' will be accepted.
- See the manual for the semantics of the 'password expired' flag.
- Also, the account for the anonymous user has been removed.
- In addition, you can run:
- /usr/bin/mysql_secure_installation
- which will also give you the option of removing the test database.
- This is strongly recommended for production servers.
- See the manual for more instructions.
- Please report any problems at http://bugs.mysql.com/
- The latest information about MySQL is available on the web at
- http://www.mysql.com
- Support MySQL by buying support/licenses at http://shop.mysql.com
- New default config file was created as /usr/my.cnf and
- will be used by default by the server when you start it.
- You may edit this file to change server settings
最后一段中提示了重要信息,很多人因为不喜欢读英文,导致接下来不知道怎么操作!
二就是安装完成,启动服务之后
使用命令:“mysql -uroot -p”输入你之前安装后设置的密码,看能不能登录,如果还可以登录,说明没有卸载干净!
CentOS下如何完全卸载MySQL相关推荐
- CentOS下如何完全卸载MySQL?解决卸载不干净的问题
出处:https://my.oschina.net/zhangjie830621/blog/466279 CentOS下如何完全卸载MySQL?解决卸载不干净的问题 系统:CentOS 6.5,MyS ...
- centos怎么样快速卸载mysql_CentOS下如何完全卸载MySQL?卸载自带的mysql
CentOS下如何完全卸载MySQL?解决卸载不干净的问题 系统:CentOS 6.5,MySQL:MySql 5.6 这里主要解决使用rpm安装的卸载问题,安装方法见:CentOS安装mysql*. ...
- 如何在centos中完全彻底卸载mysql
CentOS 下如何完全卸载MySQL?解决卸载不干净的问题 系统:CentOS 6.5,MySQL:MySql 5.6 这里主要解决使用rpm安装的卸载问题,安装方法见:CentOS安装MySQL* ...
- MySQL——在Linux下安装和卸载MySQL
MySQL--在Linux下安装和卸载MySQL 摘要:本文主要学习了如何在Linux系统中安装和卸载MySQL数据库. 查看有没有安装过MySQL 使用命令查看有没有安装过: 1 [root@loc ...
- CentOS下安装及配置MySQL
大家好,我是中国码农摘星人. 欢迎分享/收藏/赞/在看! 欢迎提出使用本篇文章安装 MySQL 时遇到的问题,本篇文章会持续更新- MySQL 是一个关系型数据库管理系统,由瑞典 MySQL AB 公 ...
- 在CentOS下安装apche+tomcat+mysql+php
在CentOS下安装apche+tomcat+mysql+php 本例中所用到的软件 Apache 2.2 Sun的JDK-1_5_0_12-linux-i586 MySQL: mysql-5.0.4 ...
- windows 7下如何卸载重装mysql 压缩包版百度经验_windows下安装、卸载mysql服务的方法(mysql 5.6 zip解压...
MySQL是一个小巧玲珑但功能强大的数据库,目前十分流行.但是官网给出的安装包有两种格式,一个是msi格式,一个是zip格式的.很多人下了zip格式的解压发现没有setup.exe,面对一堆文件一头雾 ...
- nginx 怎么重新编译安装mysql,centos 下 编译安装 nginx + mysql + php 服务
centos 下编译安装nginx + mysql + php 服务 1.安装nginx 1.1.安装依赖包 yum install wget make gcc gcc-c++ pcre-devel ...
- linux 卸载glibc,CentOS下glibc库卸载恢复
CentOS下glibc库卸载恢复 CentOS glibc 在yum update或是手动更新glibc过程中,手残卸载glibc之后系统将缺失一些核心函数如cd/ls/cp等等,几乎废掉. 在保持 ...
最新文章
- C#获取文件的当前路径
- Python 解决 :NameError: name ‘reload‘ is not defined 问题
- 使用Java方法实现 Double和String相互转化
- ios 请求头设置token_HTTP中的OPTIONS请求
- python鸡兔同笼编程运行结果_Python少儿编程:鸡兔同笼
- 专业设计师是哪里找到高质量素材的!
- Apache Dubbo集群容错
- 【java进阶之路】(并发编程篇)1.Java线程
- 读 《.Net 之美》解析.Net Remoting (应用程序域)-- Part.1
- html flash带播放视频源码,HTML嵌套Flash播放视频
- OpenCASCADE7.6编译
- cmd连局域网mysql_cmd连接局域网mysql
- 字节跳动java后端一面面经(头条/西瓜视频)
- Vue实现导出Excel功能
- 如何合理运用美容院资源
- 基于面向对象实现:猫抓老鼠小游戏 有一只猫和一只老鼠,当猫的体重是小于老鼠体重的5倍时,猫可以抓到老鼠。
- 微机原理与接口技术课内实验-NUAA-Masm for Windows
- 嵌入式linux备份flash,嵌入式Linux裸机开发(十一)——Nandflash
- studio 热重载应用_热重载 (Hot reload)
- 原生js快速查找指定元素
热门文章
- java修改服务器文件名,批量修改文件名 java代码
- 一键获取速卖通商品详情
- 王桂林 C++视频 学习笔记
- 大端字节序与小端字节序 (网络字节序与主机字节序)
- 微信小程序 - 从入门到入土
- 海滩上有一堆桃子,五只猴子来分
- 欧姆龙PLC-CP1H与fanuc机器人走eip配置文档
- 报错解决:[nodemon] app crashed - waiting for file changes before starting...
- python 12306登录 2019_python爬虫--模拟12306登录
- 8-5以下面四个标签(读写器范围内)为例说明二进制树型搜索算法选择电子标签迭带过程