[关闭]
@nalan90 2018-06-13T09:59:02.000000Z 字数 448 阅读 588

CentOS 7 安装MySQL 5.6

MySQL


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

安裝 MySQL 套件
  1. yum install mysql-community-server

启动MySQL
  1. systemctl start mysqld

开机自启动 mysqld
  1. /usr/bin/systemctl enable mysqld

设置 MySQL 密码
  1. /usr/bin/mysql_secure_installation

登录 MySQL
  1. mysql -uroot -p

远程访问授权
  1. mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;
  2. Query OK, 0 rows affected (0.00 sec)
  3. mysql> flush privileges;
  4. Query OK, 0 rows affected (0.00 sec)
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注