Error connecting to MySQL: Access denied for user: 'da_admin

sajiran

New member
Joined
Nov 28, 2012
Messages
3
Hello,
my mysql root password not working, when i want to use: http://help.directadmin.com/item.php?id=45 . i got a below problem:

PHP:
[root@web ~]# mysqld_safe --skip-grant-tables &
[1] 18358
[root@web ~]# A mysqld process already exists
UPDATE mysql.user SET password=PASSWORD('newpass') WHERE user='root';
-bash: syntax error near unexpected token `('
[1]+  Exit 1                  mysqld_safe --skip-grant-tables


can someone help me? thank you
 
The root mysql login should be in /usr/local/directadmin/conf/mysql.conf
 
oh because they forgot to add an important step in the guide.

After the command

Code:
mysqld_safe --skip-grant-tables &

You need to run the following command to get into the mysql shell:
Code:
mysql -u root

So your commands will be:
Code:
/etc/init.d/mysqld stop
mysqld_safe --skip-grant-tables &
mysql -u root

Then once the mysql shell opens do:
Code:
UPDATE mysql.user SET password=PASSWORD('newpass') WHERE user='root';
UPDATE mysql.user SET password=PASSWORD('newpass') WHERE user='da_admin';
FLUSH PRIVILEGES;

Make sure to replace newpass with whatever password you want to use.
Update the /usr/local/directadmin/conf/mysql.conf with the new password for the da_admin user as well.

To close the mysql shell you can do:

Code:
quit;

Then start mysql again with:
Code:
killall -9 mysqld_safe; killall -9 mysqld
/sbin/service mysqld restart

You might also have to do everything in step 2 in the guide too.
 
Back
Top