#copy form my sina blog http://blog.sina.com.cn/s/blog_67c902bd0102w79z.html
>create user MyTest identified by '123456'
#grant privileges>grant all privileges on *.*
##grant all privileges on *.*
##grant all privileges on *.*
##grant all privileges on *.*
##grant all privileges on *.*
##grant all privileges on dbName.tableName
##GRANT SELECT, INSERT, UPDATE, DELETE ON websites TO'techonthenet'@'localhost' identified by ##'123456' with grantoption;
####NOTE: with grant option means that
# select current user
>select user();
#select users
>use mysql;
>select user[,host] from user;
#show current user databases;
>show databases;
#show current user database tables
>show tables;
###########################################################
FAQ:ERROR 1044 (42000):Access denied for user ''@'localhost'(using password: YES)
reslove:skip grant tables and use mysql to update the record wherehost value is localhost
#>service mysqld stop
#>mysqld_safe --skip-grant-tables
#mysql>mysql
#mysql>use mysql
#mysql>update user set user=root,password=password("123456")where host="localhost";
#mysql>flush privileges;
#mysql>exit ;
#mysql -h 127.0.0.1 -u root -p
#mysql>use mysql
#mysql>grant all privileges on *.* to 'root'@'localhost'identified by '123456' with grant option
#mysql>exit;