Grant select, update, insert, delete on *. * To Frank @ localhost identified by "Frank ";
Bin> mysql-u Root
Mysql> grant permission 1, permission 2 ,... Permission n on database name. Table name to user name @ user address identified by 'Connection password ';
Permission 1, permission 2 ,... Permission n indicates 14 permissions, including select, insert, update, delete, create, drop, index, alter, Grant, references, reload, shutdown, process, and file.
When permission 1, permission 2 ,... Permission N is replaced by all privileges or all, indicating that all permissions are granted to the user.
When the database name. Table name is replaced by *. *, it grants the user the permission to operate all the tables in the database on the server.
The user address can be localhost, IP address, machine name, or domain name. You can also use '%' to connect from any address.
The 'Connection password' cannot be blank; otherwise, creation fails.
For example:
Mysql> grant select, insert, update, delete, create, drop on vtdc. employee to joe@10.163.225.87 identified by '123 ′;
Assign the user Joe from 10.163.225.87 the permission to perform select, insert, update, delete, create, drop, and other operations on the database's vtdc employee table, and set the password to 123.
Mysql> grant all privileges on vtdc. * To joe@10.163.225.87 identified by '000000 ′;
Assign the user Joe from 10.163.225.87 the permission to perform all operations on all tables in the database vtdc and set the password to 123.
Mysql> grant all privileges on *. * To joe@10.163.225.87 identified by '000000 ′;
Assign the user Joe from 10.163.225.87 the permission to perform all operations on all tables in all databases and set the password to 123.
Mysql> grant all privileges on *. * to Joe @ localhost identified by '000000 ′;
Grant the local user Joe the permission to perform all operations on all tables in all databases and set the password to 123. From: http://hi.baidu.com/chenbing3313/blog/item/05bc1f95f435c2087af4806e.html