MySQL 5.7 – reset root password

So there’s been a change in the way you reset the MySQL root password in MySQL 5.7 as in the “password” field got removed, so the old way of resetting the password doesn’t work anymore:

| authentication_string | text | YES | | NULL | |

So let’s go:

1 – stop the mysqld:

systemctl mysqld stop

2 – start mysqld with skip-grant so it doesn’t ask for your password:

mysqld –skip-grant-tables &

3 – change the pw:

use mysql;

update user set authentication_string=password(‘yourNewPwHere’) where user=’root’;

flush privileges;


4 – stop the mysql

5 – start the mysql with the new root pw

systemctl start mysqld


Reset wordpress file/folder permissions

If you need a quick and easy fix for broken wordpress permissions - feel free to copy/paste the lines below. These will reset them to defaults.

cd /your/wordpress/folder
find . -type d -exec chmod 755 {} \;  # Change directory permissions rwxr-xr-x
find . -type f -exec chmod 644 {} \;  # Change file permissions rw-r--r--