How to Connect to a MySQL Database
What is MySQL
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. MySQL is most commonly used as a Web application alternative to proprietary database systems because of its speed and reliability. MySQL can run on UNIX, Windows and Macintosh operating systems.
Connect to a MySQL database using Perl, PHP, or Python
To connect your web page to your MySQL database:
- Log into your Domains dashboard and click on Hosting.
- In the left pane, click on MySQL Management.
- Find the database that you wish to set up the connection for and click on Manage.
- On the far right side of the Database user, click the three dots or options menu.
- Select Generate Code and then select the language for which you wish to create the connection string - Perl, PHP, Python or ASP (Windows hosting only)
- As soon as you make your selection, the connection string and other code necessary to connect to your database are generated.
- Click on Copy Code Snippet and close the box.
- Paste this code into the appropriate place on your site, where you wish to connect to the database.