Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a free domain running at x10hosting (x10.bz), and I want to find out the IP Address of my MySQL host for it, so I can contact the MySQL database from another host. I've already added that host to the access list, but now I need to find out the IP Address of the MySQL host. How can I find this out? x10 is using cPanel X and PHPMyAdmin.

share|improve this question

2 Answers 2

up vote 19 down vote accepted

The SQL query SHOW VARIABLES WHERE Variable_name = 'hostname' will show you the hostname of the MySQL server which you can easily resolve to its IP address.

SHOW VARIABLES WHERE Variable_name = 'port' Will give you the port number.

You can find details about this in MySQL's manual: SHOW VARIABLES Syntax and 5.1.4. Server System Variables

share|improve this answer
My hostname says ubuntu. How do I check the IP address of that? –  Pacerier Jul 7 at 7:19

Using PHPMyAdmin all variables are already listed if you click "home" > "MySQL system variables". You can use the find feature of your browser to search for the "hostname" and the "port" variables or scroll to them. It's listed in alphabetical order. No mucking about with queries if you are a non technical person.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.