Error connecting to MySQL: Access denied for user 'da_admin'@'localhost' (using passw

trengine

New member
Joined
Oct 9, 2011
Messages
1
I am receiving the following error in DirectAdmin, and despite following a few tutorials, cannot get around it:

Error connecting to MySQL: Access denied for user 'da_admin'@'localhost' (using password: YES)

I receive this error when attempting to create a new database within DirectAdmin. I believe it started as a result of issuing the 'chown' command on the directory /var/lib/mysql/mysql/ but I am not sure. Therefore, I was wondering if anyone knew what user should be the owner of the /var/lib/mysql/mysql/ directory, OR, if this can be resolved another way.
 
Try:

Code:
cat /usr/local/directadmin/conf/mysql.conf

Copy the password and try

Code:
mysql -u da_admin -p

Paste the password and check if it give error or it log.

If it give error try

Code:
mysql -u root -p

Paste the password and check if it give error or it log.

If this work, now you are logged into mysql and you can (use google for that) change the da_admin user password.

If doesnt work use google to find how restore lost root mysql password.

Regards
 
I am receiving the following error in DirectAdmin, and despite following a few tutorials, cannot get around it:

Error connecting to MySQL: Access denied for user 'da_admin'@'localhost' (using password: YES)

I receive this error when attempting to create a new database within DirectAdmin. I believe it started as a result of issuing the 'chown' command on the directory /var/lib/mysql/mysql/ but I am not sure. Therefore, I was wondering if anyone knew what user should be the owner of the /var/lib/mysql/mysql/ directory, OR, if this can be resolved another way.



First, please be carefully with your server when try my guide here, hope my guide can help you:
Login to Mysql:
Code:
>mysql -u root
Set the root password for all local domains:
Code:
>SET PASSWORD FOR 'root'@'localhost' = PASSWORD('123456');
>SET PASSWORD FOR 'root'@'localhost.localdomain' = PASSWORD('123456');
>SET PASSWORD FOR 'root'@'127.0.0.1' = PASSWORD('123456');
Drop any users:
Code:
>DROP USER ''@'localhost';
>DROP USER ''@'localhost.localdomain';
Create username + assign:
Code:
>CREATE USER 'thunn'@'localhost' IDENTIFIED BY 'some_password';
>GRANT ALL PRIVILEGES ON *.* TO 'thunn'@'localhost' WITH GRANT OPTION;

Please consider to check this file too:
Username/password DirectAdmin are saved at:
/usr/local/directadmin/conf/mysql.conf
 
All files and directories should belong to mysql:mysql. And you should really consider

/usr/local/directadmin/scripts/set_permissions.sh

as the only possible tool for fixing permissions issue, when you don't know what files to whom should belong.


I believe it started as a result of issuing the 'chown' command on the directory /var/lib/mysql/mysql/ but I am not sure. Therefore, I was wondering if anyone knew what user should be the owner of the /var/lib/mysql/mysql/ directory, OR, if this can be resolved another way.
 
Back
Top