Can[t connect to database


I am having a problem with mysql hostname. I put the hostname in mycode and I get this


Warning: mysql_connect() [function.mysql-connect]: Unknown MySQL server host

‘mysqlworkingmathtool400com’ (1) in /home/roronron/

on line 3
Unable to select database

I get my host name from here

Hostname (these are all interchangeable) Web Administration Actions phpMyAdmin
Delete Hostname phpMyAdmin
Delete Hostname phpMyAdmin
Delete Hostname

The hostname below I copy and paste into my code

This is my line of code where I enter the hostname


one post is really enough… 3 is just spamming :frowning:

how recently did you create the hostname? perhaps DNS needs time to propagate.

You could also try one of the other hostnames, all 3 point to the same server.

Did you override a variable name in that statement? $username and $password are in variables, was was host originally also? If so put that back and define the variable (it may used elsewhere.)


I’m amazed that PHP accepts that at all without quotes around the hostname. Add some and try again.