Mysql cannot connect – Access denied

Trainee Asked on October 12, 2019 in Cpanel.
Add Comment
1 Answer(s)

If your account is on a shared server (which it appears yours is), you actually do not have access to update any settings within phpMyAdmin. This is because in a shared server, those changes you would make would affect all other users in the shared server.

Access denied for user

Your cPanel username and password can be used to connect to your databases (as well as your cPanel). If you’re connecting to your database using your cPanel username and password, you can  reset your cPanel password</a> to ensure you are using the correct username and password.

If you setup a MySQL username and password specifically for accessing a database, you’ll want to ensure you are using the correct username in your php scripts. For example, MySQL usernames are always in this format:


If your cPanel username is userna5 and you created a database username of dbuser1, then the actual database username would be:


When connecting to a database, you need to ensure that:
1. You’ve created a database
2. You’ve created a database username
3. You’ve assigned that user with privileges to your database

I hope this helps point you in the right direction. If you need further help, feel free to post a comment at the bottom of this page with more details.

Reviewer Answered on October 12, 2019.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.