News
Linux
First, shutdown the MySQL database and login as the root user on your Gentoo system.
Linux: Reset your MySQL root password
So, you've lost the password for the root user of you MySQL server. How stupid! Don't do it ever again! Well, you still have to reset the password now, don't you. I'll explain how it is done. The same will go for most other systems, only the startup and shutdown procedures might be slightly different.
/etc/init.d/mysql stopAfter that you have to start MySQL in a way that ignores the current grant tables. Grant tables are used to authorise access to users.
mysqld --skip-grant-tablesNow, reset the root password
mysqladmin -u root flush-privileges password "newpwd" mysqladmin -u root -h localhost flush-privileges password "newpwd"With this brand new password set, shutdown MySQL.
mysqladmin -u root -p shutdownNow it's time to bring your MySQL server back up for production use. You should never leave your server running with --skip-grant-tables enabled for that is a big security risk!
/etc/init.d/mysql startThat's all. Now don't forget your root password again. And if you do, you know where to find the tutorial on how to fix it.


No comments posted yet.
Only logged in users are allowed to comment. Register or log in.