MySQL : Access denied for user 'Mysql_dbuser'@'localhost' (using password: YES) in /home/cPanel_user/public_html/file path.php

You may face this error while using mysqli_connect function on your website.

Cause :

This may be an issue with all privileges of your mysql db user on database.

Fix :

You can fix this issue by entering the command through ssh or from cPanel.

(1) Command Line :

Below command will provide all the privilages to user on the database

grant all on .* to [email protected]; flush privileges;

(2) cPanel :

Please refer to the; below steps to fix this error if you have cPanel at your end.

  1. Login to your cPanel.

  2. Click on MySQL Databases.



  3. Go to Add User To Database section. Select your user and database in respective Drop-down and click on Add Button.



  4. Tick on All Privileges and click on Make Changes Button. It will provide all the permission for your database user to your database.



         This should fix your issue of Access denied for user 'Mysql_dbuser'@'localhost'

Related Articles

How to install MediaWiki in Linux hosting?

Pre-installation Steps: Set up MySQL database Please refer following article to set up MySQL...

Fix :: FTP Error at FileZilla FTP Client : "Could not connect to server"

Problem Statement Getting an error after initialization of TLS in FileZilla Error Message FTP:...

I am having an upload error. What is maximum upload limit in Shared Hosting?

Linux Shared Hosting   In Linux Shared Hosting, we have restricted the upload size limit to 2...

Do you provide SFTP in Linux Shared Hosting Plans?

No. We do not provide SFTP (Secure FTP over SSH). However, we support, FTPS (FTP over explicit...

How To Check Inode Usage In Your cPanel Account?

Inode is a data structure that keeps the data of all files inside the hosting account. Total...

  • 0 Users Found This Useful

Was this answer helpful?