{"id":407,"date":"2017-08-23T17:29:33","date_gmt":"2017-08-23T09:29:33","guid":{"rendered":"https:\/\/i007.cc\/wordpress\/?p=407"},"modified":"2019-06-25T19:23:42","modified_gmt":"2019-06-25T11:23:42","slug":"centos%e4%b8%8bmysql%e7%9a%84%e5%bd%bb%e5%ba%95%e5%8d%b8%e8%bd%bd","status":"publish","type":"post","link":"https:\/\/i007.cc\/wordpress\/archives\/407","title":{"rendered":"CentOS\u4e0bMySQL\u7684\u5f7b\u5e95\u5378\u8f7d"},"content":{"rendered":"<div class=\"article_bar clearfix\">\n<div class=\"artical_tag\">#################CentOS7\u4e0bMySQL\u7684\u5378\u8f7d####################<\/div>\n<\/div>\n<div id=\"article_content\" class=\"article_content tracking-ad\" data-mod=\"popu_307\" data-dsm=\"post\">\n<p><strong>1\uff1a\u67e5\u770bMySQL\u662f\u5426\u5b89\u88c5:<\/strong><\/p>\n<p>\u65b9\u5f0f1:<\/p>\n<pre class=\"plain\">[root@localhost usr]# yum list installed mysql*\r\nLoaded plugins: fastestmirror\r\nLoading mirror speeds from cached hostfile\r\n * base: mirrors.yun-idc.com\r\n * extras: mirror.neu.edu.cn\r\n * updates: mirrors.yun-idc.com\r\nInstalled Packages\r\nMySQL-client.x86_64   5.6.27-1.el6    installed\r\nMySQL-devel.x86_64    5.6.27-1.el6    installed\r\nMySQL-server.x86_64   5.6.27-1.el6    installed\r\n[root@localhost usr]#\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>\u65b9\u5f0f2(\u00a0-i\u00a0 :\u4e0d\u533a\u5206\u5927\u5c0f\u5199)\uff1a<\/p>\n<pre class=\"plain\">[root@localhost usr]# rpm -qa | grep -i mysql\r\nMySQL-server-5.6.27-1.el6.x86_64\r\nMySQL-client-5.6.27-1.el6.x86_64\r\nMySQL-devel-5.6.27-1.el6.x86_64\r\n[root@localhost usr]# \r\n<\/pre>\n<p><strong>2\uff1a\u5378\u8f7dMySQL:<\/strong><\/p>\n<p><strong>\u5378\u8f7d1\uff1a<\/strong><\/p>\n<pre class=\"plain\">[root@localhost usr]# yum remove mysql mysql-server mysql-libs compat-mysql51\r\n[root@localhost usr]# rm -rf \/var\/lib\/mysql\r\n[root@localhost usr]# rm \/etc\/my.cnf<\/pre>\n<p>\u5982\u679c\u88c5\u4e86mysql-devel(\u5176\u4ed6\u4e00\u6837add command)\uff0c\u5378\u8f7d\u4e3a\uff1a<\/p>\n<pre class=\"plain\">[root@Tony_ts_tian init.d]# yum remove mysql mysql-devel mysql-server mysql-libs compat-mysql51<\/pre>\n<p>\u6ce8\uff08\u4f8b\u5982\uff09:<\/p>\n<div>mysql-5.5.39-1.el6.remi.x86_64<br \/>\nmysql-libs-5.5.39-1.el6.remi.x86_64<\/div>\n<div>compat-mysql51-5.1.54-1.el6.remi.x86_64<br \/>\nmysql-server-5.5.39-1.el6.remi.x86_64<\/div>\n<div><strong>\u5378\u8f7d2{\u7ee7\u7eed\uff0c1\uff0c2\u9009\u62e9\u4e00\u79cd\uff08\u6b64\u5904\u4e3a\u4ecb\u7ecd\uff09\uff1a}:<\/strong><\/div>\n<pre class=\"plain\">[root@localhost mysql]# rpm -aq | grep -i mysql\r\nMySQL-server-5.6.27-1.el6.x86_64\r\nMySQL-client-5.6.27-1.el6.x86_64\r\nMySQL-devel-5.6.27-1.el6.x86_64\r\n[root@localhost mysql]# rpm -e MySQL-server-5.6.27-1.el6.x86_64\r\n[root@localhost mysql]# rpm -e MySQL-client-5.6.27-1.el6.x86_64\r\n[root@localhost mysql]# rpm -e MySQL-devel-5.6.27-1.el6.x86_64\r\n[root@localhost rc.d]# cd \/var\/lib\/\r\n[root@localhost lib]# rm -rf mysql\/<\/pre>\n<div><strong>\u6ce8:\u5220\u9664MySQL\u6570\u636e\u5e93\u76ee\u5f55(\u5173\u952e) \uff0c\u5426\u5219password\u4e0d\u66f4\u65b0\uff08\u9ed8\u8ba4\u5b89\u88c5\uff0c\u5982\u679c\u81ea\u5b9a\u4e49\u5b89\u88c5\u8def\u5f84\u548c\u94fe\u63a5\u8def\u5f84ln -s \u2026\u2026\u8bf7\u5220\u9664\u3002\uff09<\/strong><\/div>\n<div><strong>\u00a0\u00a0<\/strong>rm -rf \/var\/lib\/mysql<\/div>\n<div><strong>\u5378\u8f7d3\uff1a<\/strong><\/div>\n<div>\n<pre class=\"plain\">[root@localhost usr]# whereis mysql\r\nmysql: \/usr\/lib64\/mysql\r\n[root@localhost usr]# rm -rf \/usr\/lib64\/mysql<\/pre>\n<\/div>\n<div>\u6ce8\uff1afind \/ -name mysql<\/div>\n<div>\u6ce8\uff1a\u6e05\u7a7a\u76f8\u5173mysql\u7684\u6240\u6709\u76ee\u5f55\u4ee5\u53ca\u6587\u4ef6\u548c\u5176\u4ed6\u914d\u7f6e\u548c\u8bbe\u7f6e\u7b49\u3002\u5982\u679c\u6709\uff0c\u5219\u5220\u9664\u3002\u4e5f\u5fc5\u987b\u8003\u8651\u5176\u4ed6\u8f6f\u4ef6\u4e0d\u53bb\u5f71\u54cd\u3002<\/div>\n<div>rm -rf \/usr\/lib\/mysql<br \/>\nrm -rf \/usr\/share\/mysql<br \/>\n<strong>\u5378\u8f7d4\uff1a<\/strong><\/div>\n<div>\n<pre class=\"plain\">[root@localhost usr]# rm \u2013rf \/usr\/my.cnf\r\n[root@localhost usr]# rm -rf \/root\/.mysql_sercret \r\n<\/pre>\n<\/div>\n<div><strong>\u5378\u8f7d5\uff08\u81ea\u542f\u670d\u52a1\uff09\uff1a<\/strong><\/div>\n<div>\n<pre class=\"plain\">[root@localhost usr]# chkconfig --list | grep -i mysql\r\n[root@localhost usr]# chkconfig --del mysqld<\/pre>\n<pre class=\"plain\">\u6b64\u5904\u5220\u9664\u770b\u81ea\u5df1\u8bbe\u7f6e:mysql\/mysqld<\/pre>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>#################Cen<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"colormag_page_container_layout":"default_layout","colormag_page_sidebar_layout":"default_layout","footnotes":""},"categories":[],"tags":[117,47],"class_list":["post-407","post","type-post","status-publish","format-standard","hentry","tag-01-linux","tag-linux"],"_links":{"self":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/posts\/407","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/comments?post=407"}],"version-history":[{"count":0,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/posts\/407\/revisions"}],"wp:attachment":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/media?parent=407"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/categories?post=407"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/tags?post=407"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}