If your website uses a content management system (CMS) such as WordPress, Joomla, or Drupal then it will need a MySQL database. Your hosting control panel (cPanel) will allow you to easily install WordPress through the “Softaculous Apps Installer” but if you need to manually setup a database connection in cPanel here is how to do it:
In order for a website to connect to its database it will need at least 4 pieces of information; database name, MySQL username, MySQL user password, and database host.
1- Log into cPanel and go to ‘Databases’->’MySQL Databases’
2- Create a database first. Then create a MySQL user with a strong randomized password and be sure to note the password – your website will need this password to connect to its database.
3- Next go to “Add User to Database” and select the MySQL database you created AND the MySQL user you created. Check “All Privileges” and save
4- In order for a website to connect to its database it will need at least 4 pieces of information:
- MySQL Database name
- MySQL Username
- MySQL User password
- MySQL hostname is localhost
5- You can now update your website’s configuration file with that information which will allow it to connect to the database you just created.
6- If you are looking to make manual changes to your database or to import a .sql file into a new database, you can use phpMyAdmin which is available in cPanel.