Jump to content

Warning: mysql_pconnect() Access denied for user


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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.