mysql 创建用户并授予某数据库的权限

创建用户, 所有IP可访问

create user 'nameOfUser'@'%' identified by 'passwordOfUser';

授予某数据库的权限

grant all privileges on tableName.* to 'nameOfUser'@'%';

猜你喜欢

转载自blog.csdn.net/wuzhong8809/article/details/105659937