Hi guyz I found this code : http://pastebin.com/gK4qTxVy This is to check the mysql connection, the problem is this checks the DB connection internally only. I mean you need to upload this file to the server and check the connection, what i want is where i can externally check the connection.. Meaning if i host this php in my server, i should be able to check any db connection by providing the server name or server ip. Currently if I do this it says access denied in my local server. anyone can guide? Thanks
You are looking at the "Allow remote access" configuration. Most host will allow you to turn it on to give access to the DB from outside the server. For an answer we need to know the host/control panel.
They may want to know the IP you are using first. Are you testing your own database connections or other people's sites?
you need to allow remote database connections (most servers doesnt allow them by default) you can go to the servers cpanel and add your ip to the list of allowed remote connections also, instead of localhost, you need to put the remote database connection (it could be an ip or nameserver eg: mysql.myhost.com)