2011
03.06

In order to backup your WordPress webserver you need to backup both the wordpress media content directory as well as the WordPress MySQL database. Unfortunately somehow I managed to forget my MySQL root password, luckily¬† however I was able to find instructions on how to bypass the MySQL database login authentication and reset MySQL’s root password.

RESET MYSQL ROOT PASSWORD

Stop mysql services:
sudo /etc/init.d/mysql stop

Start mysql in safe mode and skip user authentication:
sudo mysqld_safe --skip-grant-tables &

Login to mysql as root:
mysql -u root

Set a new password:
UPDATE mysql.user SET Password=PASSWORD('new_password_here') WHERE User='root';

When you modify the grant tables manually you need to run:
flush privileges;

Restart the mysql services:
sudo /etc/init.d/mysql start

The FLUSH PRIVILEGES statement tells the server to reload the grant tables.

No Comment.

Add Your Comment