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

  

posted @ 2021-06-26 15:51  阢Lana  阅读(49)  评论(0编辑  收藏  举报
/*别去做新时代教化的奴隶,别轻易去向别人看齐——*/
正在加载今日诗词....
© options->title(); ?>. Typecho 强力驱动'); ?>.