|
Posted by John Nichel on 07/14/05 18:31
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?
>
Did you restart MySQL after you added the permissions?
--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
john@kegworks.com
Navigation:
[Reply to this message]
|