Description:
User is "inventory" with no password. I can log in via mysql and create tables and temporary tables ok.
However when I try from PHP with this code:
//+++++++++++++++++++++++
$connection = @mysql_pconnect("localhost", "inventory", "");
mysql_select_db("inventory");
$result - mysql_query("create table inventory.m2 (i INT NOT NULL)") or die (mysql_error() . "<br>");
//+++++++++++++++++++++++
it always gives an access denied error.
As soon as I add a password to the user and change the above to have a password it works fine. Doesn't seem like this is a PHP error, but maybe it is?
The PHP started failing when I added code for the create table. It was working find with selects before that.
How to repeat:
User privileges don't matter. I set user to "all privs" and it still did not work until I added a password to the user.
//+++++++++++++++++++++++
$connection = @mysql_pconnect("localhost", "inventory", "");
mysql_select_db("inventory");
$result - mysql_query("create table inventory.m2 (i INT NOT NULL)") or die (mysql_error() . "<br>");
//+++++++++++++++++++++++
Description: User is "inventory" with no password. I can log in via mysql and create tables and temporary tables ok. However when I try from PHP with this code: //+++++++++++++++++++++++ $connection = @mysql_pconnect("localhost", "inventory", ""); mysql_select_db("inventory"); $result - mysql_query("create table inventory.m2 (i INT NOT NULL)") or die (mysql_error() . "<br>"); //+++++++++++++++++++++++ it always gives an access denied error. As soon as I add a password to the user and change the above to have a password it works fine. Doesn't seem like this is a PHP error, but maybe it is? The PHP started failing when I added code for the create table. It was working find with selects before that. How to repeat: User privileges don't matter. I set user to "all privs" and it still did not work until I added a password to the user. //+++++++++++++++++++++++ $connection = @mysql_pconnect("localhost", "inventory", ""); mysql_select_db("inventory"); $result - mysql_query("create table inventory.m2 (i INT NOT NULL)") or die (mysql_error() . "<br>"); //+++++++++++++++++++++++