PhProblems
November 4, 2004 11:25 AM   Subscribe

myPHPadmin : I'm trying to get it to run an line of MySQL and it's complaining. Anyone got any thoughts? [MI]

Command:
grant all on phpgroupware.* to phpgw@localhost identified by "my-db-passwd";

Error:
You have an error in your SQL syntax near 'BY "my-db-passwd"' at line 1

I assumed the problem was that "my-db-passwd" should be swapped out with the database password, but that doesn't make much sense to me, nor does it work.

What the hell is going on?
posted by twine42 to Computers & Internet (8 answers total)
 
Try putting single quotes around 'my-db-passwd' instead of double quotes. Maybe that's all it is.
posted by misterioso at 12:36 PM on November 4, 2004


Nope. That's not it. Hmmm...
posted by twine42 at 1:15 PM on November 4, 2004


It's probably getting munged by myPHPadmin somewhere, try typing it into the commandline client (where your query works fine for me).

Alternatively, perhaps you're running a (very) outdated version of MySQL?
posted by fvw at 1:49 PM on November 4, 2004


If you can connect to the MySQL shell on the server, try issuing the command in there.

Otherwise, you can just go into the mysql database's dbs table and add the user in there. Don't forget to flush privileges afterwards and put the password in using password().
posted by SpecialK at 1:59 PM on November 4, 2004


I suspect it might be PHP's magic quotes feature coming to the rescue and gacking everything up. Just a guess, but perhaps you need to turn that off in your PHP configuration file.
posted by Khalad at 2:01 PM on November 4, 2004


I'd love to go in and use command line, but the damned thing is on a remote server and the person who owns it doesn't seem to have telnet access. hohum.

I think it might be time toi contact the provider and try and sweet talk the customer service reps into doing me a little favour...
posted by twine42 at 2:28 PM on November 4, 2004


Ummm -- isn't it grant all privileges on phpgroupware.* to phpgw@localhost identified by "my-db-passwd";?
posted by delfuego at 2:51 PM on November 4, 2004


Nope, privileges is optional after all.

No telnet access is very wise of the owner, try ssh instead.
posted by fvw at 4:28 PM on November 4, 2004


« Older Online introduction to Perl Unix scripting?   |   The National Debt's APR? Newer »
This thread is closed to new comments.