siwelis Posted April 29, 2011 Share Posted April 29, 2011 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 Quote Link to comment https://forums.phpfreaks.com/topic/235056-warning-mysql_pconnect-access-denied-for-user/ Share on other sites More sharing options...
fenway Posted April 30, 2011 Share Posted April 30, 2011 And with mysql_connect(), this user works? Quote Link to comment https://forums.phpfreaks.com/topic/235056-warning-mysql_pconnect-access-denied-for-user/#findComment-1208716 Share on other sites More sharing options...
siwelis Posted May 16, 2011 Author Share Posted May 16, 2011 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. Quote Link to comment https://forums.phpfreaks.com/topic/235056-warning-mysql_pconnect-access-denied-for-user/#findComment-1215890 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.