source: https://devanswers.co/how-to-reset-mysql-root-password-ubuntu/ #mysql 5.7
sudo /etc/init.d/mysql stop sudo mkdir /var/run/mysqld sudo chown mysql /var/run/mysqld
sudo mysqld_safe --skip-grant-tables& sudo mysql --user=root mysql mysql> update user set authentication_string=PASSWORD('your_password_here') where user='root';
update user set plugin="mysql_native_password" where User='root'; mysql> update user set plugin="mysql_native_password" where User='root'; mysql> flush privileges; mysql> exit sudo killall -u mysql sudo /etc/init.d/mysql start