The host or user argument to GRANT is too long?

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
Owe Blomqvist
Forum Commoner
Posts: 33
Joined: Wed Oct 16, 2002 2:27 pm

The host or user argument to GRANT is too long?

Post by Owe Blomqvist »

Hi.
I ran into a little Grant problem.
When i try to run the grant script i receive an error saying:
"The host or user argument to GRANT is too long"

Here´s the piece of code causing it:

Code: Select all

<?php
mysql_query("GRANT
  SELECT,
  INSERT,
  UPDATE,
  CREATE,
  DELETE,
  INDEX,
  ALTER
ON 
  ".$config['DB_COMMON']['DATABASE'].".* 
TO 
  '".$config['DB_WRITE']['USER']."'@'%' 
IDENTIFIED BY 
  '".$config['DB_WRITE']['PASS']."'") 
or die( mysql_error() );

?>
Owe Blomqvist
Forum Commoner
Posts: 33
Joined: Wed Oct 16, 2002 2:27 pm

Post by Owe Blomqvist »

Nevermind.
It turned out either the username or password was to long. :/

It´s a strange error message for such a simple error though.
/Owe Blomqvist
Post Reply