Re: cannot connect to MySQL server and not sure why

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxx' (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?


Did you restart MySQL after you added the permissions?

--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
john@xxxxxxxxxxxx

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux