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.

/usr/local/directadmin/scripts/setup.txt

 

b) If you are not able to find out the password, you need to restart the MySQL using the option ‘skip-grant-tables’.

/etc/init.d/mysqld stop

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.

use mysql

UPDATE user SET password=PASSWORD(’newpass’) WHERE user=’root’;

FLUSH PRIVILEGES;

Quit

 

d) Shutdown and start the MySQL.

killall -9 mysqld_safe

killall -9 mysqld

/etc/init.d/mysqld start

 

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;

FLUSH PRIVILEGES;

quit

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.

/usr/local/directadmin/conf/mysql.conf

user=da_admin

passwd=newdapass

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.

 
Was this answer helpful? 0 Users Found This Useful (0 Votes)