Re: cannot connect to MySQL server and not sure why
| From: | Kristen G. Thorson | Date: | Thu, 14 Jul 2005 15:39:27 +0000 |
| Subject: | Re: cannot connect to MySQL server and not sure why | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-218696@lists.php.net to get a copy of this message | ||
MySQL authentication is user+host+password. Make sure user brucer_webmaster has host 69.90.88.155.
kgt
Bruce Gilbert wrote:
I am having trouble connecting to MySQL server through a PHP script and I am not sure why. the error I receive is: Warning: mysql_pconnect(): Access denied for user: 'bruceg_webmaster@69.90.88.155' (Using password: YES) in /hsphere/local/home/bruceg/inspired-evolution.com/search/include/connect.php on line 6 Cannot connect to database, check if username, password and host are correct. trying to connect with the following script: ?php $database="bruceg_search"; $mysql_user = "bruceg_webmaster"; $mysql_password = " password"; $mysql_host = "server-10.existhost.com"; mysql_pconnect ($mysql_host, $mysql_user, $mysql_password); if (!$success) die ("<b>Cannot connect to database, check if username, password and host are correct.</b>"); $success = mysql_select_db ($database); if (!$success) { print "<b>Cannot choose database, check if database name is correct."; die(); } ?> I double checked the database and I have created a database called bruceg_search and added a user called bruceg_webmaster with all of the editing privileges. Of course 'password' is changes with the password used to connect in the actual script. and I double checked that to be correct as well. Any suggestions?