2020年6月20日 星期六

MySQL 8 更改 remote access

//Create the root user 
1  nano /etc/my.cnf  //centos7

 comment the bind_address  (好像不需要)
 或是 
 bind_address 0.0.0.0


2 create user root
//(yes, a new user because what exists is 'root@localhost'
// which is local access only):

CREATE USER 'root'@'%' IDENTIFIED BY '123';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%';


3 restart
sudo systemctl restart mysqld

2020年6月10日 星期三