You are here: RE: [PHP] cannot connect to MySQL server and not sure why « PHP « IT news, forums, messages
RE: [PHP] cannot connect to MySQL server and not sure why

Posted by "yanghshiqi" on 10/01/71 11:21

Make sure that your ip is granted too.




Best regards,
Shiqi Yang
-----Original Message-----
From: Bruce Gilbert [mailto:webguync@gmail.com]
Sent: Thursday, July 14, 2005 11:27 PM
To: php-general@lists.php.net
Subject: [PHP] cannot connect to MySQL server and not sure why

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?

--
::Bruce::

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация