How do I configure my web application with MySQL?
Updated on 3 November 2026
You will often need to configure your web application so that it works with your database. If you have not done so yet, create a new database in cPanel and take note of:
- the name of the database
- the name of the user who has access to the database
- that user's password
Here are your connection details for the database:
- Server name or hostname: localhost
- Database: the full name of the database created in cPanel
- Username: the full name of the user created for your database when the database was created
- Password: that user's password.