View Full Version : Error connecting to MySQL: Access denied for user 'da_admin'@'localhost' (using passw
trengine
10-09-2011, 01:24 PM
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.
SeLLeRoNe
10-10-2011, 12:14 AM
Try:
cat /usr/local/directadmin/conf/mysql.conf
Copy the password and try
mysql -u da_admin -p
Paste the password and check if it give error or it log.
If it give error try
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
thunn
04-28-2012, 01:56 PM
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:
>mysql -u root
Set the root password for all local domains:
>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:
>DROP USER ''@'localhost';
>DROP USER ''@'localhost.localdomain';
Create username + assign:
>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
zEitEr
05-01-2012, 12:02 PM
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.
Powered by vBulletin™ Version 4.0.4 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.