新版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 远程连接数据库

上一篇:MySQL慢日志


下一篇:android动态改变TextView字体大小遇到的问题