时间:2021-07-01 10:21:17 帮助过:30人阅读
1 grant all on * to ‘username‘ identified by ‘password‘;
1 mysql -h IP地址 -u username-p 2 FLUSH PRIVILEGES改表法
1 mysql -u root -p 2 mysql>use mysql; 3 mysql>update user set host = ‘%‘ where user = ‘root‘; 4 mysql>select host, user from user;授权法
1 GRANT ALL PRIVILEGES ON *.* TO ‘username‘@‘%‘ IDENTIFIED BY ‘password‘ WITH GRANT OPTION; 2 FLUSH PRIVILEGES;
1 GRANT ALL PRIVILEGES ON *.* TO ‘username‘@‘192.168.0.1‘ IDENTIFIED BY ‘password‘ WITH GRANT OPTION; 2 FLUSH PRIVILEGES;
1 GRANT ALL PRIVILEGES ON dbname.* TO ‘username‘@‘192.168.0.1‘ IDENTIFIED BY ‘password‘ WITH GRANT OPTION; 2 FLUSH PRIVILEGES;
Mysql远程连接授权IP
标签:增加 blog local nbsp 授权 where 联网 mysql logs