Access denied for user da_admin – MySQL error in DirectAdmin
Sometimes we will get the following MySQL errors in DirectAdmin.
Error connecting to MySQL: Access denied for user: ‘da_admin@localhost’ (Using password: YES)
Please follow the steps given below to fix this issue.
1) Please make sure that the MySQL root password is correct. If you know the password, follow the second step.
a) You can find out the MySQL root password in the following file.
b) If you are not able to find out the password, you need to restart the MySQL using the option ‘skip-grant-tables’.
mysqld_safe –skip-grant-tables &
After this you will be able to access MySQL without root password.
c) Once you are able to access MySQL command prompt, run the following commands to reset the MySQL root password.
UPDATE user SET password=PASSWORD(’newpass’) WHERE user=’root’;
d) Shutdown and start the MySQL.
killall -9 mysqld_safe
killall -9 mysqld
2) We can now reset password of da_admin MySQL user.
a) Type the following command.
mysql -uroot –p
b) Enter the MySQL root password.
c) Run the following commands in MySQL prompt.
GRANT ALL PRIVILEGES ON *.* TO da_admin@localhost IDENTIFIED BY ‘daadminpass’ WITH GRANT OPTION;
That will set the password for da_admin in MySQL.
3) We need to make sure it’s setup correctly for DA to use. Edit the MySQL configuration file and enter the new da-admin password.
That will fix the issues and you will be able to access DirectAdmin again.
If you need any further help please reach our support department.