How to Connect to MySQL at Hostgator

Save

Many applications you store on your Hostgator Web hosting provider account require a user name, password and hostname. Remote applications, such as the MySQL query browser also need the server's IP address and port to properly connect to a MySQL database. These databases are critical parts of Web application operation because they are used to update, delete, add and read new information in real-time. Most programs have a configuration file where these connection settings are stored and you must enter your database's security information before they can make use of your account.

  • Open the MySQL connection configuration file or dialog in your program. There is no standard location for this, so consult your program's manual, readme or install instructions file for further directions.

  • Locate the "Host," "Hostname" or "Database IP" field. Enter "localhost" if this is a script or program you are uploading to your host. Enter your Hostgator server IP address if connecting from a query browser application. This information was sent to you along with your FTP information in the welcome email.

  • Enter "cpanelusername_databasename" for the "Database name" field. For example, if your database is named "AccountRecords" and your CPanel username is "muffin342," your database name is "muffin342_AccountRecords."

  • Enter your cPanel and database username for the "Database username" field. For example, "muffin342_Accounting" if your MySQL username is "Accounting."

  • Supply the password to your database in the "Database Password" field.

  • Enter the port "3306" using either Transmission Control Protocol (TCP) or User Datagram Protocol (UDP) for the connection protocol.

Tips & Warnings

  • Unlike many hosts, Hostgator allows you to remotely connect directly to your database. If your connection is refused, you'll have to email "support@hostgator.com" with your IP address to allow direct access to your database.

References

Promoted By Zergnet

Comments

Resources

You May Also Like

Related Searches

Check It Out

Geek Vs Geek: Robot battles, hoverboard drag race, and more

M
Is DIY in your DNA? Become part of our maker community.
Submit Your Work!