Please follow below steps to add a user to a database and give privileges.
Step-1: Login to your cPanel account and search database and select MySQL Databases.
Step-2: Scroll down the page to the end and under “Add User to Database“, select a user from the dropdown list, and then choose a Database from the list to give access.
Step-3: On the next page under “Manage User Privileges“, mark the box “ALL PRIVILEGES” to assign all permission and click on “Make Changes“. (Note- you may also give selected access if you want)
Step-4: Once the user is added to the database successfully you will see a confirmation message as showing below.