数据库
首页 > 数据库> > 新版mysql 远程连接数据库

新版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;

  

标签:username,OPTION,GRANT,PRIVILEGES,IDENTIFIED,mysql,新版,数据库,localhost
来源: https://www.cnblogs.com/zlshy/p/14934476.html