Bug #4615 create table not allowed from php program without password
| Submitted: | 19 Jul 2004 2:35 | Modified: | 23 Jul 2004 6:09 |
|---|---|---|---|
| Reporter: | Richard Williams | Email Updates: | |
| Status: | Can't repeat | Impact on me: | |
| Category: | MySQL Server | Severity: | S3 (Non-critical) |
| Version: | 4.0.15 | OS: | MacOS (Mac OS X) |
| Assigned to: | Matthew Lord | CPU Architecture: | Any |
[23 Jul 2004 6:09]
Matthew Lord
I could not repeat this using php 4.2.2 on linux nor on php 4.3.2 on OS X 3.4.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.049 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.
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>"); //+++++++++++++++++++++++