2009
09.15
09.15
If you happen to forget the root password or discover that for some reason you are unable to login, then you can make use of the --skip-grant-tables option of MySQL. This is how you use it:
First you have to stop MySQL
/etc/init.d/mysqld stop
Then you start MySQL with the --skip-grant-tables option
/usr/libexec/mysqld --skip-grant-tables
After that, use the MySQL client
mysql>
to execute the following queries:
UPDATE mysql.user SET Password=PASSWORD('####') WHERE User='root'; FLUSH PRIVILEGES;
No Comment.
Add Your Comment