Use yum linux installed under mysql, and start MySQL, etc.

Check the system comes with mysql version: rpm -qa | grep mysql

Uninstall mysql: rpm -e mysql-libs-5.1.73-8.el6_8.x86_64 --nodeps

 

1. Install mysql server:

          yum -y install mysql-server mysql-devel

2. Install the mysql client:

                   yum install mysql

3. Start mysql service:

          service mysqld start or /etc/init.d/mysqld start

stop:

          service mysqld stop

Restart:

          service mysqld restart

4. Create a root administrator:

          mysqladmin -u root password root

5. Log

mysql -uroot -proot

 

6.root rights

GRANT ALL PRIVILEGES ON *.* TO root@"%" IDENTIFIED BY "root";

flush privileges;

 

Set the boot mysql

chkconfig --add mysqld

chkconfig mysqld on

Guess you like

Origin www.cnblogs.com/mediocreWorld/p/11094703.html