Welcome to the Automation Media's - MySQL made Easy for Engineers
MySQL Tutorial - How to Connect
MySQL Tutorial - How to Connect First step to start doing anything with MySQL in ASP or PHP you must first establish a connection to your web host's MySql database. This is done with the MySQL CONNECT function.
If you've been around the internet a while you'll know that IP addresses are used as identifiers for computers and web servers.
When the ASP or PHP script and MySQL are on the same machine, you can use localhost as the address you wish to connect to.
What is localhost?
localhost is a shortcut to just have the machine connect to itself.
If your MySQL service is running at a separate location you will need to insert the IP address or URL in place of localhost.