Reset MySQL password in FreeBSD

Posted by suvi under BSD, MySQL

Reset MySQL password in FreeBSD
by alamster in June 2nd, 2008
Database Tags: change root mysql db, login to 127.0.0.1 in mysql db, reset mysql password

Just another post for my archive :-)

One our sandbox accidently delete root account with host ‘localhost’. We need to recover the account by grant new root account back into system.

The steps are :

1. Turn off mysql service

sandbox# /usr/local/etc/rc.d/mysql-server stop

2. Run mysql with skip grant table mode

sandbox# mysqld_safe –skip-grant-tables &
[1] 5187

Read more ….

Leave a Reply

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word