Reset MySQL Root Password
(Debian based example).
First, stop the daemon:
#/etc/init.d/mysqld stop
Second, start mysql without privileges:
#mysqld --skip-grant-tables &
Third, connect to the daemon and make changes:
#mysql
#UPDATE mysql.user SET Password=PASSWORD('NewPassword') WHERE User='root';
#FLUSH PRIVILEGES;
#quit
Now stop the daemon and start it normally:
#/etc/init.d/mysql stop
#/etc/init.d/mysql start
It might be sufficient with a simple restart, but I like it the explicit way to be sure.
For more information on this subject, visit the official MySQL reference:
http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html#resetting-permissions-unix
Leave a Reply
Welcome to Thronic.com
Search this Site
Miscellaneous Links
Recent Articles
- Google-like search suggestion tool
- Linux Bash Color
- Resize a div layer with javascript
- Moving a div layer with javascript
- Web Galaxy » A sci-fi browser game
- Windows 7 on Asus Eee 900 PC
- IE and PHP sessions
- Wordpress 2.8.6 Spell Check Languages
- Reset MySQL Root Password
- Linux hosts file
- IdleGuard
- Column count in SQL
- String encryption in PHP
- Alphanumeric Captcha values in PHP
- Your own numeric Captcha in PHP
