1、用户授权
mysql> GRANT ALL privileges ON *.* TO ‘test‘@‘%‘ IDENTIFIED BY ‘123456‘;
=》给test用户所有权限,使用这条语句,如果没有test用户,还会自动创建用户,密码为123456。
2、可以通过以下语句观察:
mysql> use mysql;
mysql> select host,user,password from user ;

原文:http://www.cnblogs.com/meiping/p/7009852.html