The command line enters the directory where the Mysql.exe
Mysql-uroot-padmin
Example:
Grant all privileges on * * to [E- Mail protected] identified by ' 1 ';
Flush privileges;
Mysql> grant permissions 1, permissions 2,... Permission n on the database name. Table name to User name @ user address identified by ' connection password ';
Permissions 1, Permissions 2,... Permission n represents 14 permissions, such as Select,insert,update,delete,create,drop,index,alter,grant,references,reload,shutdown,process,file.
When permissions 1, permissions 2,... Permission n is replaced by all privileges or all to give the user full permission.
When the database name. The table name is replaced by *. *, which indicates that the user is given permission to manipulate all tables on the server.
The user address can be localhost, or it can be an IP address, a machine name, and a domain name. You can also use '% ' to indicate connections from any address.
' Connection password ' cannot be empty, otherwise the creation failed.
Mysql>grant Select,insert,update,delete,create,drop on Vtdc.employee to [e-mail protected] identified by ' 123′;
Assign the user Joe from 10.163.225.87 the ability to perform operations such as Select,insert,update,delete,create,drop on the employee table VTDC the database, and set the password to 123.
Mysql>grant all privileges in vtdc.* to [e-mail protected] identified by ' 123′;
For users from 10.163.225.87, Joe assigns permissions to all operations on the database VTDC all tables, and sets the password to 123.
Mysql>grant all privileges on * * to [e-mail protected] identified by ' 123′;
For users from 10.163.225.87, Joe assigns permissions to all the tables in all databases and sets the password to 123.
Mysql>grant all privileges on * * to [e-mail protected] identified by ' 123′;
Assign the native user Joe permission to all operations on all tables in all databases, and set the password to 123.
MySQL enables remote connection of databases by adding users