At 13:12 -0500 12/16/03, Ari Davidow wrote:
I seem to have run into a problem with a host name that incorporates a hyphen:

mysql> GRANT ALL ON *.* TO [EMAIL PROTECTED] IDENTIFIED BY "foo";
ERROR 1064: You have an error in your SQL syntax near '-dev.foo.com IDENTIFIED BY "foo"' at line 1
mysql> GRANT ALL ON *.* TO "[EMAIL PROTECTED]" IDENTIFIED BY "foo";
ERROR 1145: The host or user argument to GRANT is too long


I must be missing something very obvious--how to incorporate a hostname with a hyphen, for instance. Can someone help?

Quote it. Better yet, always quote usernames *and* hostnames to avoid the problem entirely: 'me'@'mysite-dev.foo.com'

Note that the username and hostname are quoted separately.


-- Paul DuBois, Senior Technical Writer Madison, Wisconsin, USA MySQL AB, www.mysql.com

Are you MySQL certified? http://www.mysql.com/certification/


-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to