远程访问CENTOS的MYSQL数据库设置

时间:2021-08-12 06:40:39

远程访问CENTOS的MYSQL数据库设置

mysql -u root 

grant all privileges on *.* to root@'%'identified by 'root';  
后面的root是root用户的密码
grant all privileges on *.* to root@'localhost'identified by 'root';  

mysql -u root -p