|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
如果您觉得本篇CentOSLinux教程讲得好,请记得点击右边漂浮的分享程序,把好文章分享给你的好朋友们!CentOS下怎样完整卸载MySQL?办理卸载不洁净的成绩
体系:CentOS6.5,MySQL:MySql5.6
这里次要办理利用rpm装置的卸载成绩,装置***见:CentOS装置mysql*.rpm提醒conflictswithfilefrompackage的办理举措
固然说这里的是利用rpm装置的卸载成绩,我以为利用yum体例装置的假如碰到不异的成绩也一样合用。
检察已装置的办事
rpm–qa|grep-imysql
-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–eMySQL-client-5.6.19-1.linux_glibc2.5.x86_64
rpm-eMySQL-server-5.6.19-1.linux_glibc2.5.x86_64
检察残留的目次:
whereismysql
然后删除mysql目次:
rm–rf/usr/lib64/mysql
删除相干文件:
rm–rf/usr/my.cnf
rm-rf/root/.mysql_sercret
最关头的:
rm-rf/var/lib/mysql
假如这个目次假如不删除,再从头装置以后,暗码仍是之前的暗码,不会从头初始化!
网上查了好久都没有文章提到这个,最初仍是本人探索找出来的。
卸载完成!怎样断定是否是真的卸载洁净了呢?
一是看装置输入:
假如没有卸载洁净,装置server时输出只要两行:
[plain]viewplaincopy
- [root@localhostopt]#rpm-ivhMySQL-server-5.6.19-1.linux_glibc2.5.x86_64.rpm
- Preparing...###########################################[100%]
- 1:MySQL-server###########################################[100%]
卸载洁净了装置输出以下:
[plain]viewplaincopy
- [root@localhostopt]#rpm-ivhMySQL-server-5.6.19-1.linux_glibc2.5.x86_64.rpm
- Preparing...###########################################[100%]
- 1:MySQL-server###########################################[100%]
- 2014-09-2307:22:430[Warning]TIMESTAMPwithimplicitDEFAULTvalueisdeprecated.Pleaseuse--explicit_defaults_for_timestampserveroption(seedocumentationformoredetails).
- 2014-09-2307:22:4326041[Note]InnoDB:Usingatomicstorefcountbufferpoolpages
- 2014-09-2307:22:4326041[Note]InnoDB:TheInnoDBmemoryheapisdisabled
- 2014-09-2307:22:4326041[Note]InnoDB:Mutexesandrw_locksuseGCCatomicbuiltins
- 2014-09-2307:22:4326041[Note]InnoDB:Compressedtablesusezlib1.2.3
- 2014-09-2307:22:4326041[Note]InnoDB:UsingLinuxnativeAIO
- 2014-09-2307:22:4326041[Note]InnoDB:UsingCPUcrc32instructions
- 2014-09-2307:22:4326041[Note]InnoDB:Initializingbufferpool,size=128.0M
- 2014-09-2307:22:4326041[Note]InnoDB:Completedinitializationofbufferpool
- 2014-09-2307:22:4326041[Note]InnoDB:Thefirstspecifieddatafile./ibdata1didnotexist:anewdatabasetobecreated!
- 2014-09-2307:22:4326041[Note]InnoDB:Settingfile./ibdata1sizeto12MB
- 2014-09-2307:22:4326041[Note]InnoDB:Databasephysicallywritesthefilefull:wait...
- 2014-09-2307:22:4326041[Note]InnoDB:Settinglogfile./ib_logfile101sizeto48MB
- 2014-09-2307:22:4326041[Note]InnoDB:Settinglogfile./ib_logfile1sizeto48MB
- 2014-09-2307:22:4526041[Note]InnoDB:Renaminglogfile./ib_logfile101to./ib_logfile0
- 2014-09-2307:22:4526041[Warning]InnoDB:Newlogfilescreated,LSN=45781
- 2014-09-2307:22:4526041[Note]InnoDB:Doublewritebuffernotfound:creatingnew
- 2014-09-2307:22:4526041[Note]InnoDB:Doublewritebuffercreated
- 2014-09-2307:22:4526041[Note]InnoDB:128rollbacksegment(s)areactive.
- 2014-09-2307:22:4526041[Warning]InnoDB:Creatingforeignkeyconstraintsystemtables.
- 2014-09-2307:22:4526041[Note]InnoDB:Foreignkeyconstraintsystemtablescreated
- 2014-09-2307:22:4526041[Note]InnoDB:Creatingtablespaceanddatafilesystemtables.
- 2014-09-2307:22:4526041[Note]InnoDB:Tablespaceanddatafilesystemtablescreated.
- 2014-09-2307:22:4526041[Note]InnoDB:Waitingforpurgetostart
- 2014-09-2307:22:4526041[Note]InnoDB:5.6.19started;logsequencenumber0
- Arandomrootpasswordhasbeenset.Youwillfinditin/root/.mysql_secret.
- 2014-09-2307:22:4626041[Note]Binlogend
- 2014-09-2307:22:4626041[Note]InnoDB:FTSoptimizethreadexiting.
- 2014-09-2307:22:4626041[Note]InnoDB:Startingshutdown...
- 2014-09-2307:22:4826041[Note]InnoDB:Shutdowncompleted;logsequencenumber1625977
- 2014-09-2307:22:480[Warning]TIMESTAMPwithimplicitDEFAULTvalueisdeprecated.Pleaseuse--explicit_defaults_for_timestampserveroption(seedocumentationformoredetails).
- 2014-09-2307:22:4826065[Note]InnoDB:Usingatomicstorefcountbufferpoolpages
- 2014-09-2307:22:4826065[Note]InnoDB:TheInnoDBmemoryheapisdisabled
- 2014-09-2307:22:4826065[Note]InnoDB:Mutexesandrw_locksuseGCCatomicbuiltins
- 2014-09-2307:22:4826065[Note]InnoDB:Compressedtablesusezlib1.2.3
- 2014-09-2307:22:4826065[Note]InnoDB:UsingLinuxnativeAIO
- 2014-09-2307:22:4826065[Note]InnoDB:UsingCPUcrc32instructions
- 2014-09-2307:22:4826065[Note]InnoDB:Initializingbufferpool,size=128.0M
- 2014-09-2307:22:4826065[Note]InnoDB:Completedinitializationofbufferpool
- 2014-09-2307:22:4826065[Note]InnoDB:HighestsupportedfileformatisBarracuda.
- 2014-09-2307:22:4826065[Note]InnoDB:128rollbacksegment(s)areactive.
- 2014-09-2307:22:4826065[Note]InnoDB:Waitingforpurgetostart
- 2014-09-2307:22:4826065[Note]InnoDB:5.6.19started;logsequencenumber1625977
- 2014-09-2307:22:4826065[Note]Binlogend
- 2014-09-2307:22:4826065[Note]InnoDB:FTSoptimizethreadexiting.
- 2014-09-2307:22:4826065[Note]InnoDB:Startingshutdown...
- 2014-09-2307:22:5026065[Note]InnoDB:Shutdowncompleted;logsequencenumber1625987
- ARANDOMPASSWORDHASBEENSETFORTHEMySQLrootUSER!
- Youwillfindthatpasswordin/root/.mysql_secret.
- Youmustchangethatpasswordonyourfirstconnect,
- nootherstatementbutSETPASSWORDwillbeaccepted.
- Seethemanualforthesemanticsofthepasswordexpiredflag.
- Also,theaccountfortheanonymoususerhasbeenremoved.
- Inaddition,youcanrun:
- /usr/bin/mysql_secure_installation
- whichwillalsogiveyoutheoptionofremovingthetestdatabase.
- Thisisstronglyrecommendedforproductionservers.
- Seethemanualformoreinstructions.
- Pleasereportanyproblemsathttp://bugs.mysql.com/
- ThelatestinformationaboutMySQLisavailableonthewebat
- http://www.mysql.com
- SupportMySQLbybuyingsupport/licensesathttp://shop.mysql.com
- Newdefaultconfigfilewascreatedas/usr/my.cnfand
- willbeusedbydefaultbytheserverwhenyoustartit.
- Youmayeditthisfiletochangeserversettings
最初一段中提醒了主要信息,良多人由于不喜好读英文,招致接上去不晓得怎样操纵!
二就是装置完成,启动办事以后
利用下令:“mysql-uroot-p”输出你之前装置后设置的暗码,看能不克不及登录,假如还能够登录,申明没有卸载洁净!
欢迎大家来到仓酷云论坛! |
|