Linux MySql new user creation and permission assignment

Create a user that only allows local IP access

create user 'lyy'@'localhost' identified by '123456';

Create user to allow perimeter access

create user 'lyy'@'%' identified by '123456';

Execute Refresh Authorization

flush privileges;

Grant users all permissions to operate a certain database through the extranet

grant all privileges on `testdb`.* to 'lyy'@'%' identified by '123456';

Grant users access to all databases on the external network

grant all privileges on `*.*`.* to 'lyy'@'%' identified by '123456';

Guess you like

Origin blog.csdn.net/weixin_39709134/article/details/128016150