PHP guestbook and SQL server problems...

llama009
llama009 used Ask the Experts™
on
While trying to setup a PHP guestbook I got this error when attempting to do step 2

Warning: MySQL Connection Failed: Unknown MySQL Server Host 'sql1.portlandpremium.co.uk' (0)

That is a real host how-ever as I (the script actually) succesfully created the database required in step 1.

The SQL host is a different server to my hosting server.(Although both are run by the same company).

Any suggestions

P.S. It has been giving me this message since the 30th October.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Hello,

It seems like there is a problem with connectivity from your webserver to your mysql server.
Try following script on your webserver.

<?php

     $fp = fsockopen('xxx.xxxxx.com',3306,$errorno,$errstr,30);
     if(! $fp)
          print "MySQL is not running on 3306 port. Error message is : " .$errstr;
     else
          print "MySQL is running !! :) ";

?>

Regards,
JD

P.S. : You should put up your real host name. Its a good idea to mask out such details.

Author

Commented:
I tried that. The script just errored.
I tried logging in to the server and all the files seem to be right.
I wonder why it wont connect.

If i helps the address it www.caillin.com/guestbook/
Warning: MySQL Connection Failed: Access denied for user: 'root@localhost' (Using password: NO)

The above menas, that you have supplied invalid username/password.

Please obtain correct username and password and try again.
Regards,
JD

Commented:
Hello,

No comment has been added lately, so it's time to clean up this question.
I will leave a recommendation in the Cleanup topic area that dkjariwala receive the points for this question.

Please leave any comments here within the next four days.

**PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!**

Cheers,

Zontar
EE Cleanup Volunteer

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial