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:
- Log in to your Account Manager.
- Click Hosting in the left-hand menu.
- 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.
- In the left pane, click on MySQL Management.
- Look for the database you want to connect to and click its Manage button.
- On the Database Management page, look for your database user and click its ellipsis icon on the right.
- Select Generate Code from the list of options.
- Select the Programming Language (Perl, PHP, or Python) from the drop-down menu.
- 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.
- Use the code in your site where you want to make the connection to the database.