Hi,
I've been trying to give MySQL databases username/passwords using mysql_db_query and I get "Wrong parameter count for mysql_db_query()" as an error.
This is the line of code relating to it :-
mysql_db_query ("GRANT ALL ON '$dbname'.* TO '$username'@localhost IDENTIFIED BY '$password'");
I have tried various little alterations like putting the $dbname.* in a variable then putting the variable into the mysql_db_query, like this :-
$databasename = "$dbname.*";
$lusername = "$username@localhost";
mysql_db_query ("GRANT ALL ON '$databasename' TO '$lusername' IDENTIFIED BY '$password'");
However this still spews out the same error message.
It is probobly something really simple, however I have spent a few hours racking my brains and got no where.
Any help would be appreciated.
Lawrence
I've been trying to give MySQL databases username/passwords using mysql_db_query and I get "Wrong parameter count for mysql_db_query()" as an error.
This is the line of code relating to it :-
mysql_db_query ("GRANT ALL ON '$dbname'.* TO '$username'@localhost IDENTIFIED BY '$password'");
I have tried various little alterations like putting the $dbname.* in a variable then putting the variable into the mysql_db_query, like this :-
$databasename = "$dbname.*";
$lusername = "$username@localhost";
mysql_db_query ("GRANT ALL ON '$databasename' TO '$lusername' IDENTIFIED BY '$password'");
However this still spews out the same error message.
It is probobly something really simple, however I have spent a few hours racking my brains and got no where.
Any help would be appreciated.
Lawrence