mysql creates a user and grants permissions to a database

Create user, all IP can be accessed

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

Permission granted to a database

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

Guess you like

Origin blog.csdn.net/wuzhong8809/article/details/105659937