#mysqld_safe
--skip-grant-tables &
#mysql -u root -p
#mysql -u root -p
MariaDB [(none)]> use mysql;
MariaDB [(none)]> update user set password=PASSWORD("mynewpassword") where User='root';
MariaDB [(none)]> update user set plugin="mysql_native_password";
MariaDB [(none)]> quit;
#/etc/init.d/mysql stop
#sudo kill -9 $(pgrep mysql)
#/etc/init.d/mysql start