Re: cannot connect to MySQL server and not sure why

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

 



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

-- 
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