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 Richard Davey on 07/14/05 18:36

Hello Bruce,

Thursday, July 14, 2005, 4:27:12 PM, you wrote:

BG> ?php
BG> $database="bruceg_search";
BG> $mysql_user = "bruceg_webmaster";
BG> $mysql_password = " password";
BG> $mysql_host = "server-10.existhost.com";
BG> mysql_pconnect ($mysql_host, $mysql_user, $mysql_password);
BG> if (!$success)
BG> die ("<b>Cannot connect to database, check if username, password and
BG> host are correct.</b>");
BG> $success = mysql_select_db ($database);
BG> if (!$success) {
BG> print "<b>Cannot choose database, check if database name is correct.";
BG> die();
BG> }
?>>

BG> I double checked the database and I have created a database called
BG> bruceg_search and added a user called bruceg_webmaster with all of
BG> the editing privileges. Of course 'password' is changes with the
BG> password used to connect in the actual script. and I double
BG> checked that to be correct as well. Any suggestions?

Sure.. where is $success set?

I don't see it being set anywhere :)

Best regards,

Richard Davey
--
http://www.launchcode.co.uk - PHP Development Services
"I do not fear computers. I fear the lack of them." - Isaac Asimov

 

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

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