1. 下載MySQL Yum Repository http://dev.mysql.com/downloads/repo/yum/ 2. 本地安裝MySQL Yum Repository sudo yum localinstall platform-and-version-specific-pac ...
1. 下載MySQL Yum Repository http://dev.mysql.com/downloads/repo/yum/ 2. 本地安裝MySQL Yum Repository sudo yum localinstall platform-and-version-specific-package-name.rpm 3. 安裝MySQL sudo yum -y install mysql-community-server 4. 查看root初始密碼 sudo grep 'temporary password' /var/log/mysqld.log 5. 執行安全性設置 mysql_secure_installation 6.設置字元集 vi /etc/my.cnf [mysql] default-character-set=utf8 [mysqld] character_set_server=utf8 7. 設置開機啟動 chkconfig --levels 235 mysqld on 8. 關閉CentOS防火牆 firewall-cmd --permanent --zone=public --add-port=3306/tcp firewall-cmd --permanent --zone=public --add-port=3306/udp firewall-cmd --reload 9. 創建遠程訪問用戶 CREATE USER 'bounter'@'%' IDENTIFIED BY '111111@Bounter'; GRANT SELECT,INSERT,UPDATE,DELETE ON *.* TO 'bounter'@'%'; flush privileges; 10. 啟動和關閉MySQL服務 sudo service mysqld start sudo service mysqld stop