centos6、7在線升級mysql到mysql5.7
阿新 • • 發佈:2018-02-08
執行 state wget 改密 防火墻策略 51cto 啟動數據庫 權限 註意 centos7對mysql進行在線升級:
①下載mysql源
wget http://dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpm
②安裝mysql5.7源
yum localinstall -y mysql57-community-release-el7-7.noarch.rpm
③安裝數據庫服務器
yum install -y mysql-community-server
④啟動數據庫服務
systemctl start mysqld.service
⑤防火墻策略
iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT
mysql_secure_installation
註意:第一次執行該腳本時,輸入密碼是⑤步驟查看的
⑦刷新權限 能讓其他主機連接該數據庫
grant all privileges on . to ‘root‘@‘%‘ identity by ‘密碼‘;
flush privileges;
⑧防火墻策略
iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT
①下載mysql源
wget http://dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpm
②安裝mysql5.7源
yum localinstall -y mysql57-community-release-el7-7.noarch.rpm
③安裝數據庫服務器
yum install -y mysql-community-server
④啟動數據庫服務
systemctl start mysqld.service
⑤防火墻策略
iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT
centos6.X對mysql進行在線升級
①下載mysql源
wget http://dev.mysql.com/get/mysql57-community-release-el6-7.noarch.rpm
②安裝mysql5.7源
yum localinstall -y mysql57-community-release-el6-7.noarch.rpm
③安裝數據庫服務器
yum install -y mysql-community-server
④啟動數據庫服務
service mysqld start
⑤查看臨時密碼
grep ‘temporary password‘ /var/log/mysqld.log
⑥執行安全腳本,並修改密碼
註意:第一次執行該腳本時,輸入密碼是⑤步驟查看的
⑦刷新權限 能讓其他主機連接該數據庫
grant all privileges on . to ‘root‘@‘%‘ identity by ‘密碼‘;
flush privileges;
⑧防火墻策略
iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT
centos6、7在線升級mysql到mysql5.7