To access a MySQL/MariaDB database, the database user must have access granted first. In this article, we will cover how to grant this access.
1) Navigate to the following page in cPanel.
Home > Databases > MySQL Databases
2) Select the database user and the database from the dropdown boxes in the "Add User To Database" section and click the "Add" button.
3) Check the appropriate privileges and click the "Make Changes" button. Note that an "All Privileges" checkbox is present in the upper left corner.