Double quotes around the password?
This is what I use (recently tested on version 5.0.37 but as far as I know it also works on 4.0.23a)
Code:
mysql> grant all privileges on *.* to 'wim'@'localhost' identified by 'my password' with grant option;
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
This is the example from the reference manual for v3.23, v4.0 and v4.1)
Code:
GRANT ALL ON mydb.mytbl TO 'someuser'@'somehost';
please note that user and host are treated separately (so each of them between single quotes instead of together); might be another cause of the error.
Note: check your documentation