MySQL - Creating a user and specifying a password
Your syntax is the good one :

[root@localhost] [(none)] mysql&gt; CREATE USER 'foo'@'2.2.2.2' IDENTIFIED BY 'bar';
Query OK, 0 rows affected (0.00 sec)


You can see if your user is created by using :

[root@localhost] [(none)] mysql&gt; show grants for 'foo'@'2.2.2.2';
+----------------------------------------------------------------------------------------------------------+
| Grants for foo@2.2.2.2                                                                                   |
+----------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'foo'@'2.2.2.2' IDENTIFIED BY PASSWORD '*E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB' |
+----------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)


But it'll work only if you connect from 2.2.2.2.

Max.