External mySQL connection

Associate
Joined
18 Oct 2002
Posts
1,581
Location
Nottingham
I know i can connect to the db from my site by using localhost, is there anyway i can found out the ip so i can connect to my db from a mySQL app. i have tried to dns my site but the ip it returns doesnt work.

any ideas?
 
Beansprout said:
If the MySQL server is localhost for your scripts then it's running on the same physical machine as your website files.

Therefore you can use the IP address, your website's domain name, whatever - the key is that all the varioous schemes point to the same physical machine.

By default you can only access the database locally and you need to explicitly grant access to other hosts. You can do this with the cPanel MySQL Databases tab - see the list there, only localhost is included as default. Add your IP address and you'll be able to connect :)

Other control panels should have similar options and of course you firstly need to check if your host has port 3306 available which you can do via start > run > 'cmd' > enter > 'telnet [domain name] 3306' > enter, without the square brackets.

i added my home ip and did telnet but connection lost to host (could it be that ntl uses web proxies?)

Lt. Manlove said:
Sure you are using the correct port? Usually 3306 but if you have phpMyAdmin installed you can verify. :)

how can i verify the port?
 
Back
Top Bottom