Reset mysql password

This commit is contained in:
Bob Mottram 2014-08-02 11:48:57 +01:00
parent 2afbfce1fd
commit 0e7d133104
1 changed files with 14 additions and 0 deletions

View File

@ -7253,6 +7253,20 @@ Then visit your blog and reinstall it. Your existing content will be unaffected
If you need to import blog posts from another blog then copy the *fp-content/content* directory from the old blog to the new blog, then within the admin panel select *maintain* and *rebuild index*.
** MySql foo
*** Reset the root password
To reset the root password, or if mysql forgets its root password.
#+BEGIN_SRC: bash
/etc/init.d/mysql stop
mysqld_safe --skip-grant-tables &
mysql -u root
use mysql;
update user set password=PASSWORD("mynewpassword") where User='root';
flush privileges;
quit
/etc/init.d/mysql stop
/etc/init.d/mysql start
#+END_SRC
*** Backup all databases
To back up all mysql databases: