First, view and uninstall the original MySQL
rpm-qa | grep mysql //This command will check if the MySQL database is already installed on the operating system.
rpm-e MySQL //Normal Delete mode
rpm-e--nodeps MySQL //brute force Delete mode, if you use the above command to delete, prompted to have other dependent files, then use this command can be strongly deleted
rpm-qa | grep mysql //command to see if MySQL has been uninstalled successfully
Yum List | grep MySQL//view the downloadable version of the MySQL database available on Yum
650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M02/9C/71/wKiom1lwaoHC8LS2AAAHDdGYa3o732.png "style=" float : none; "title=" 1 view. png "alt=" Wkiom1lwaohc8ls2aaahddgya3o732.png "/>
650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M02/9C/71/wKioL1lwaoHz5SaoAACGkp47dHU896.png "style=" float : none; "title=" 2 delete. png "alt=" Wkiol1lwaohz5saoaacgkp47dhu896.png "/>
Two
Yum install-y mysql-server MySQL Mysql-deve
Install MySQL mysql-server mysql-devel (Note: When we installed MySQL, we did not install the MySQL client, which is the equivalent of installing MySQL database, we also need to install the Mysql-server server.)
650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M00/9C/71/wKiom1lwaoLQ934BAACCZkq3tDU570.png "style=" float : none; "title=" 3 install. png "alt=" Wkiom1lwaolq934baacczkq3tdu570.png "/>
Three
Rpm-qi Mysql-server//View the version of the newly installed Mysql-server
Service mysqld Start//launch our MySQL service
650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M00/9C/71/wKioL1lwaoSCEMbFAACOStfUbrk040.png "style=" float : none; "title=" 4 start. png "alt=" Wkiol1lwaoscembfaacostfubrk040.png "/>
Four
Service mysqld Restart//When you restart the MySQL service, you won't be prompted for so much information.
Chkconfig--list | grep mysqld//view MySQL service is not powered on auto start
Chkconfig mysqld on//set it to boot so you don't have to start it manually every time.
Mysqladmin-u root password ' root '//Use this command to set the root account password to root
650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M01/9C/71/wKiom1lwaoSTv6r1AABmKdsgAdQ698.png "style=" float : none; "title=" 5 self-starter and password. png "alt=" Wkiom1lwaostv6r1aabmkdsgadq698.png "/>
650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M02/9C/71/wKiom1lwaoXTY9xTAABmJTEseTk324.png "style=" float : none; "title=" 6show.png "alt=" Wkiom1lwaoxty9xtaabmjtesetk324.png "/>
V.mysql-u root-p// login to our MySQL database
650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M02/9C/71/wKioL1lwaoXhRenwAAArCc3hQzM897.png "style=" float : none; "title=" 6 landing. png "alt=" Wkiol1lwaoxhrenwaaarcc3hqzm897.png "/>
This article is from the "interconnection" blog, please be sure to keep this source http://jschinamobile.blog.51cto.com/11464420/1949420
Centos 6.5 installation MySQL Database