# mysql -uroot -p12345 -h172.16.1.111 -P4040
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 21
Server version: 5.0.77-log Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> grant all on *.* to 'test1'@'172.16.1.111' identified by '12345';
ERROR 1045 (28000): Access denied for user 'root'@'172.16.1.111' (using password: YES)
mysql> show grants;
+------------------------------------------------------------------------------------------------+
| Grants for
root@172.16.1.111 |
+------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'root'@'172.16.1.111' IDENTIFIED BY PASSWORD '2e782c85379a326e' |
+------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)