Access denied for user da_admin – MySQL error in DirectAdmin

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.

 
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Set up DirectAdmin to Use a Remote MySQL Server

Set up DirectAdmin to Use a Remote MySQL Server We can set up MySQL to be run on an external...

Redirect Website /Path to Use HTTPS in DirectAdmin

Redirect Website /Path to Use HTTPS in DirectAdmin Nowadays, If you are not using an SSL...

How to Use IPv6 Address in DirectAdmin

How to Use IPv6 Address in DirectAdmin As we all know that what is an IP address?. It is nothing...

Too Low or 0.00 Disk Usage in DirectAdmin

Too Low or 0.00 Disk Usage in DirectAdmin To check the partition on our server, need to run the...

Autodiscover Information For Mail Clients in DirectAdmin

Autodiscover Information For Mail Clients in DirectAdmin Autodiscover is a system to figure out...