时间:2021-07-01 10:21:17 帮助过:2人阅读
2、授权法
如果你想用户user使用userpwd从任何主机连接到mysql服务器:
#mysql>GRANT ALL PRIVILEGES ON *.* TO ‘user‘@‘%‘IDENTIFIED BY ‘userpwd‘ WITH GRANT OPTION;
#mysql>FLUSH RIVILEGES;
如果你想允许用户user从IP为192.168.32.220的主机连接到mysql服务器,并使用userpwd作为密码;
#mysql>GRANT ALL PRIVILEGES ON *.* TO ‘user‘@‘192.168.32.220‘IDENTIFIED BY ‘userpwd‘ WITH GRANT OPTION; #mysql>FLUSH RIVILEGES;
MySQL数据库不能远程访问的解决办法
标签: