Loading...

Knowledge Base

How to Connect to a MySQL Database

MySQL is an open-source relational database management system that uses Structured Query Language (SQL), the most popular language for adding, accessing, and processing data in a database. Because of its speed and reliability, MySQL is most commonly used as a Web application alternative to proprietary database systems. It can run on UNIX, Windows, and Macintosh operating systems.

To connect your web page to your MySQL database:

  1. Log in to your Account Manager.
  2. Click Hosting in the left-hand menu.

    Account Manager - Hosting tab

  3. Navigate to the hosting plan where your database is.

    If your account has multiple hosting plans, click the Manage button of the hosting plan where your database is located.

    Manage button

  4. In the left pane, click on MySQL Management.

    MySQL Management

  5. Look for the database you want to connect to and click its Manage button.

    Database - Manage button

  6. On the Database Management page, look for your database user and click its ellipsis icon on the right.

    Database user

  7. Select Generate Code from the list of options.

    Generate code

  8. Select the Programming Language (Perl, PHP, or Python) from the drop-down menu.

    Select programming language

  9. The connection string and codes necessary to connect to your database are generated depending on the selected programming language. Click on Copy Code Snippet and close the pop-up window.
  10. Use the code in your site where you want to make the connection to the database.

 

Loading...