Thu 21 Dec 2006
Access denied for user ‘root’@'localhost’ (using password: NO)
Posted by James under Dedicated Server Hosting , Server Security , Web Hosting , cheap linux web hosting , technical supportAccess denied for user ‘root’@’localhost’ (using password: NO)
If you are getting the above mentioned error message while accessing mysql from the shell then make sure that you have done
su -
from the command prompt after that fire
mysql
if still you are getting that error message then you need to reset the mysql password
To reset the mysql password you can use following steps:
first locate your mysql’s hostname.pid file then
kill `cat /mysql-data-directory/host_name.pid`
mysqld_safe –skip-grant-tables &
mysqladmin -u root flush-privileges password “newpasswordâ€
New password will be the password that you want to set now.
One Response to “Access denied for user ‘root’@'localhost’ (using password: NO)”
Leave a Reply
You must be logged in to post a comment.



















January 29th, 2007 at 4:41 pm
Generally mysql-data-directory is /var/lib/mysql/ on Cpanel based Linux servers .