1 rpm -Uvh http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm

2 yum repolist enabled | grep "mysql.*-community.*"

3 yum install mysql-community-server

4

5 systemctl enable mysqld systemctl daemon-reload

设置开机启动 两条语句 分开执行

6 mysql -u root

7 set password for 'root'@'localhost'=password('这里是密码');

8 GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;

9 vi /etc/my.cnf

[mysqld]
character_set_server=utf8
init_connect='SET NAMES utf8'

10 systemctl restart mysqld

results matching ""

    No results matching ""