List:General Discussion« Previous MessageNext Message »
From:Deniss Hennesy Date:March 3 2005 7:09pm
Subject:ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)
View as plain text  
Hi,

I have had to change mysql root passwd
My procedure is just below

shell> mysql -u root -p
mysql> UPDATE mysql.user SET Password=PASSWORD('newpwd')  WHERE User='root';
mysql> flush privileges;

and I checked this password another consol  I saw MySQL wasn't
accepted  new passwd else, it didnt old password or without password.

Now neither new passwd nor old passwd also empty passwd is not acceped

I change my mind and I tried that procedure

shell> kill `cat /var/db/host_name.pid`

shell> mysqld_safe --skip-grant-tables &

shell> mysqladmin -u root flush-privileges password "newpwd"

mysqladmin:connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket
'/tmp/mysql.sock' (2)'

Check that mysql is running and that the socket:'/tmp/mysql.sock' exits!

3rd way is

shell>/usr/local/etc/rc.d/mysql-server.sh stop

then

shell>safe_mysqld --user=root --pid-file=/var/db/mysql/mysql.pid
--skip-grand-tables &
[1] 28712
shell> Starting mysql deamon with databses from /var/db/mysql
050303 21:04:02 mysql ended

So I suppose that it is not initialize MySQL deamon  isnt it???

How I can recover mysql password?!??
Thread
ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)Deniss Hennesy3 Mar
  • ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)Deniss Hennesy3 Mar
  • Re: ERROR 1045: Access denied for user: 'root@localhost' (Using password:NO)sam wun4 Mar
  • Re: ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)Gleb Paharenko4 Mar