This guide explains how to give an existing database user access to a MySQL database in cPanel. An application’s database credentials work only when that user has the required permissions on the intended database.

Select the user and database

Create the database and user first if they do not yet exist. See creating a MySQL database.

  1. Log in to cPanel.

    cPanel login

  2. Open Databases > Manage My Databases, called MySQL Databases in older versions.

    Databases

    MySQL databases

    create new

  3. Under Add User to Database, select the intended user and database. Check any account prefixes in their full names.

    Add User to Database

    Database

  4. Select Add.

    Add

Set and check privileges

  1. On Manage User Privileges, select the permissions required by the application. Use All Privileges only when the application genuinely requires full access.

    All Privileges

  2. Select Make Changes and check the confirmation.

    Make changes

    success

  3. Test the application’s database connection using that user’s credentials. Adding privileges does not change its password or automatically update the application’s configuration.