mysql设置访问权限 ip段

create user 'user'@'192.168.1.%' identified by '******';

grant all privileges on `database`.* to 'user'@'192.168.1.%' with grant option;

flush privileges;

#                         账号.权限       用户名@主机地址               密码
 grant all privileges on dbName.* to 'userName'@localhost identified by 'RhBjTfDZmhFGj35Y';
 
 flush privileges;

你可能感兴趣的:(数据库,mysql)