关于开启mysql远程访问连接命令

mysql

//赋予任何主机访问数据的权限 

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'IDENTIFIED BY '自定义密码' WITH GRANT OPTION;

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'IDENTIFIED BY '123456' WITH GRANT OPTION;

 

//指定ip地址访问权限

如:

配置192.168.16.130可以通过root:123456来访问数据库

GRANT ALL PRIVILEGES ON *.* TO 'root'@'192.168.16.130'IDENTIFIED BY '123456' WITH GRANT OPTION;

 

一看大写就头疼,

grant all privileges on *.* to 'root' @'%' identified by '123456' with grant option;

 

刷新权限  

flush privileges;  

 

词汇:

grant :(合法地)授予,允许;(勉强)承认,同意

privileges :特权;

identified : 被识别的;经鉴定的;被认同者

上一篇:MySQLのFLUSH PRIVILEGESが必要なケース


下一篇:huawei 华为 ubuntu mysql 访问不了的原因