Reset root password
1. Stop mysql server
/etc/init.d/mysql stop
2. Start mysql server with safe mode and skip grant tables
#mysqld_safe –skip-grant-table
3. Update the new password
mysql
mysql> use mysql;
mysql> UPDATE user SET password=password('passwordhere') WHERE user='root';
4. Stop mysqld_safe by pressing Ctrl+C
5. Start mysql server
/etc/init.d/mysql start
Comments:0
Leave a Reply