How to find Hostname and Port of Mysql

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
maboroshi
Forum Commoner
Posts: 25
Joined: Thu Nov 13, 2003 10:10 am

How to find Hostname and Port of Mysql

Post by maboroshi »

Hi I am building an application and I need to find the ipaddress and port on which mysql is on my host server

Does anyone know how to do this or is there code that can find this information out

Thanks in advance

Maboroshi
User avatar
JAM
DevNet Resident
Posts: 2101
Joined: Fri Aug 08, 2003 6:53 pm
Location: Sweden
Contact:

Post by JAM »

Do a whois on your host to get the ip (or if being in a win32 enviroment, try the dos-cmd:
ping http://www.host.com

Port is likely 3306 as default setting.
Post Reply