|
Am having this problem with my host company; I can't get the hostname of my database, and I've been trying to contact them many times to give me the host name to use in external mysql softwares but never answered back. So is there a way to get the host name through a php script while connected to database through "localhost" ?
How to get my database host name through localhost?
I assume you want this because you want to connect via a script on another server (or a local copy of phpMyAdmin, which amounts to the same thing)
If they won't give you the host name, they don't want you to connect to it from any server but the localhost.
More than likely, knowing the host name won't help, because it's quite easy to block external connections in MySQL, and a remote request won't work even if you know the host name.
There are good free servers that allow remote acess (I like freehostia.com)
Good Luck!
|