MySQL 5.5.11 Setting Security
If you’re coming from the installation tutorial, congratulations! I’m glad that you made it this far. It took me three days to figure that out myself.
Restarting MySQL Without Permissions Table
The first step to setting your administrative password is to shutdown MySQL, because we have to restart it without the ACL loading.
$ /etc/init.d/mysql stop
Alright, so now restart MySQL using this command in order to ignore the permissions system.
$ /usr/local/mysql/bin/mysqld_safe --skip-grant-tables &
Setting your Passwords
There’s a couple ways to reset your password, this is just one way.
$ mysql -u root
mysql> use mysql;
mysql> update user set password=PASSWORD("NEW-ROOT-PASSWORD") where User='root';
mysql> flush privileges;
mysql> quit
You can’t just use restart at this point, you’ll need to stop mysql first and then start it.
$ /etc/init.d/mysql stop
$ /etc/init.d/mysql start
Now you can load mysql and test it out.
$ mysql -u root -p

1 Comment to "MySQL 5.5.11 Setting Security"
Thoufiq
May 4, 2011