這條語(yǔ)句適用于MySQL8.0之前的
而MySQL8.0及之后的,設(shè)置遠(yuǎn)程連接權(quán)限要用下面的語(yǔ)句才可以
create user root@'%' identified by '123456';
grant all privileges on *.* to root@'%' with grant option;
1、創(chuàng)建用戶
CREATE USER '用戶名'@'host' IDENTIFIED BY '密碼';
2.授權(quán)(全部數(shù)據(jù)庫(kù)權(quán)限)
grant all privileges on *.* to '用戶名'@'%' ;
3.刷新權(quán)限
flush privileges;
原始文章鏈接:
https://www.cnblogs.com/kangfei/p/14802521.html
|