欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

mysql 设置指定用户在指定域的访问权限

程序员文章站 2022-05-08 12:12:33
...
grant [all privileges][select][update] on dbname.tablename to username @'192.168.%.%' identified by 'password';
FLUSH PRIVILEGES;

其中可以更换的是
授权的权限
all privileges、select、update
数据库名
dbname
表名
tablename

用户名和密码
username、password

指定域
'192.168.%.%',百分号代表泛指