Difference between revisions of "mysql server root password recovery"
From thelinuxwiki
(Created page with "# Stop MySQL # sudo /etc/init.d/mysqld stop # start mysql in Safe mode # mysqld_safe --skip-grant-tables & # Login as root # mysql -uroot # Reset Password # use my...") |
Revision as of 22:11, 24 May 2016
- Stop MySQL
# sudo /etc/init.d/mysqld stop
- start mysql in Safe mode
# mysqld_safe --skip-grant-tables &
- Login as root
# mysql -uroot
- Reset Password
# use mysql; mysql> update user set password=PASSWORD("mynewpassword") where User='root'; mysql> flush privileges; mysql> quit
- Restart
# killall mysqld # /etc/init.d/mysqld start