Hey all, So, I just bought my first server and am setting things up for the first time. Needless to say, I am a bit lost and would like to seek some advice. The issue I'm having now is this... When I try to connect to a mysql DB using the mysql_connect() php function by passing in www.mydomain.com as the host (NOT localhost), I receive the following error: Unknown MySQL server host 'www.mydomain.com' My host had originally said it was because DNS info was still propogating. However, it's been several days now and I'm still receiving the same problem. The reason I use www.mydomain.com at times and not localhost is because I often run scripts from my local machine on the remote DB. I also sometimes query things across domains. I am currently using WHM/CPanel. Any help would be greatly appreciated! Thanks.
You mean to say you are trying to connect database which is on another server as you are putting www.domian.com. Ping that domain and see if its resolving and if yes. Put the ip address instead of domain name. I think it will solve your problem
Yes, that is correct. So far, I've uploaded several domains to the server. If I ping the domains from the server, it resolves for some domains but doesn't resolve for others. However, whether or not it resolves, I still receive the connection error.