Skip-grant-tables: Very useful MySQL boot parameters
ERROR 1045 (28000): Access denied for user ' ODBC ' @ ' localhost ' (using Password:no)
ERROR 1045 (28000): Access denied for user ' ODBC ' @ ' localhost ' (using Password:yes)
Address: 70196039
As the name implies, when you start MySQL, do not start the grant-tables, authorization table. What's the use of it? Of course it is useful to forget the administrator password.
Operation Method:
1. Kill the original MySQL:
Rcmysqld stop
Or:
Service Mysqld Stop
Or:
Kill-term mysqld
2. Start MySQL with command line parameters:
/usr/bin/mysqld_safe--skip-grant-tables &
3. Modify the Administrator password:
Use MySQL;
Update user set Password=password (' Yournewpasswordhere ') whereuser= ' root ';
Flush privileges;
Exit
4. Kill MySQL and restart MySQL
MySQL Startup parameter skip-grant-tables