Admin-Ahead Community

Linux => Control Panels => DirectAdmin => Topic started by: jominj on January 21, 2014, 04:08:11 am

Title: Error connecting to MySQL: Access denied for user: ‘da_admin@localhost’
Post by: jominj on January 21, 2014, 04:08:11 am
When connecting to the MySQL screens in DirectAdmin, if this error appears, that would indicated that the “da_admin” user has not been setup correctly. To resolve this do the following.

Code: [Select]
service mysqld stop
mysqld_safe –skip-grant-tables &

That should start up mysql without the need for a root password. Once in, type

Code: [Select]
use mysql
UPDATE user SET password=PASSWORD(‘newpass’) WHERE user=’root’;
FLUSH PRIVILEGES;
quit
That will reset the root password for you.

Type “killall -9 mysqld_safe; killall -9 mysqld” to shut down mysqld.

Start it up again with

Code: [Select]
/sbin/service mysqld start

Code: [Select]
mysql -uroot -pThen press enter. You’ll be asked for the password. Once in mysql, type:

Code: [Select]
GRANT ALL PRIVILEGES ON *.* TO da_admin@localhost IDENTIFIED BY ‘newdapass’ WITH GRANT OPTION;
FLUSH PRIVILEGES;
quit

That should set the password for da_admin in mysql.


user=da_admin
passwd=newdapass