Jump to content

Warning: mysql_pconnect() Access denied for user


siwelis

Recommended Posts

Ye ol' pconnect access denial has attacked me. I come to you weathered and torn. Do ye have some ale?

 

Ok, so here's what's happening. I'm trying to duplicate a table. No errors from the dump or the recreation of the sql database.

 

$db_server = "localhost"; 
$db_user = "chio"; 
$db_db = "chio"; 
$db_pwd = "wallaBE"; 
$sql = mysql_pconnect('localhost', $db_db, $db_pwd);
mysql_select_db($db_db, $sql) or die (mysql_error());

 

I know the problem isn't with the user or password, because I gave the new user global privileges and tested it on the original database with the same password. I even tried giving it database-level privileges. No luck. This happens for both my personal server and external web server, where the original tables can be accessed fine and the new ones can't.

 

Anyone have any idea why I can't connect to the DB? Maybe a DB setting?

 

Warning: mysql_pconnect() [function.mysql-pconnect]: Access denied for user 'chio'@'localhost' (using password: YES) in /home/chio/public_html/chio/database.php on line 6

Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/chio/public_html/chio/database.php on line 7
Access denied for user 'chio'@'localhost' (using password: YES)

 

Local Server Info:

Server version: 5.1.53-community-log

MySQL client version: mysqlnd 5.0.7-dev - 091210 - $Revision: 304625 $

 

External Server Info:

Server version: 5.0.92-community-log

MySQL client version: 4.1.22

  • 3 weeks later...

i ended up deleting my database info in the php file, ran a script to see what databases were in there and copy/pasted from there... humbly enough, i must have made a mistake in the name of the database.

 

the snippet of php script i used to list databases was this one:

$link = mysql_connect('localhost', 'chexdcom_nhca', 'vdtfDCbZrZL4mnyE');
$db_list = mysql_list_dbs($link);

while ($row = mysql_fetch_object($db_list)) {
     echo $row->Database . "\n";
}

 

to my defense, i think my host may auto-prepend an identifying character set to the database names.

 

thanks for your help fenway.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.