Skip navigation links

MySQL Forums


Advanced Search

Re: ERROR 1045 (28000): Access denied for user 'root'@'localhost'
Posted by: Bashar Shannak ()
Date: April 18, 2007 09:20AM

Hi Chris
this is the procedure how to reset the root password

first stop the server
/etc/init.d/mysql stop

second start the mysqld
and it locate depends on how you installed the mysql (rpm or compile)
but it's usually locate in /usr/sbin/
so your command is
/usr/sbin/mysqld --skip-grant-tables

enter mysql
just type
mysql (("with no user")) and that becuase there's no grant tables

mysql> update mysql.user set password = PASSWORD('newpass')
-> where user = 'root';
\q
then stop the mysqld
by issuing this command
mysqladmin shutdown
then start mysql normally
/etc/init.d/mysql start
then u can enter the mysql using the new password

Thanks
Bashar Shannak
CMDBA

Options: ReplyQuote


Subject Written By Posted
ERROR 1045 (28000): Access denied for user 'root'@'localhost' Chris Purcell 04/18/2007 08:19AM
Re: ERROR 1045 (28000): Access denied for user 'root'@'localhost' Bashar Shannak 04/18/2007 08:44AM
Re: ERROR 1045 (28000): Access denied for user 'root'@'localhost' Chris Purcell 04/18/2007 09:13AM
Re: ERROR 1045 (28000): Access denied for user 'root'@'localhost' Bashar Shannak 04/18/2007 09:20AM
Re: ERROR 1045 (28000): Access denied for user 'root'@'localhost' Chris Purcell 04/18/2007 11:04AM
Re: ERROR 1045 (28000): Access denied for user 'root'@'localhost' Mandeep Singh 04/20/2007 02:55AM
Re: ERROR 1045 (28000): Access denied for user 'root'@'localhost' shiela gavino 10/06/2007 05:34PM


Sorry, you can't reply to this topic. It has been closed.