1, in linux first login mysql:mysql-u root-p(prompt to enter the password, input can)
2. Select MySQL database: Usemysql.
Insert the user name and user password of the system in the MySQL table:
Insert into User (Host,user,password) VALUES ("localhost", "Your user name", Password ("Password you want to set"));
3, refresh the MySQL system related tables:flush privileges;
4. Add all permissions for the new user to the management database:
Grant all on database. Database tables (with * for all tables below the corresponding database) to user name ;
Memo:
Grant Select,insert,update,delete,create,drop on Vtdc.employee to [e-mail protected] identified by ' 123′;
Joe IP is 10.163.225 . The 123 to log in and VTDC corresponding table Employeeimplement Select,insert,update,delete,create,drop operation.
The IP address can be freely restricted, or no limit will be changed to *.
permissions are availableSelect,insert,update,delete,create,drop,index,alter,grant,references,reload,shutdown,process,file14 Permissions, When you want all permissions to be changed directly to grant all privileges on .
The implementation of adding users and granting permissions under MySQL in Linux