新版mysql 远程连接数据库

新版mysql改变了一些设定

要想远程连接输入以下内容

CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';

GRANT ALL PRIVILEGES ON *.* TO 'username'@'localhost' WITH GRANT OPTION;

CREATE USER 'username'@'%' IDENTIFIED BY 'password';

GRANT ALL PRIVILEGES ON *.* TO 'username'@'%' WITH GRANT OPTION;
 
CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
 
GRANT ALL PRIVILEGES ON *.* TO 'username'@'localhost' WITH GRANT OPTION;
 
CREATE USER 'username'@'%' IDENTIFIED BY 'password';
 
GRANT ALL PRIVILEGES ON *.* TO 'username'@'%' WITH GRANT OPTION;

  

上一篇:MySQL授权命令grant注意事项


下一篇:oracle创建用户、授权及角色管理