service mysqld|mariadb stop
mysqld_safe --skip-grant-table &
use mysql; update user set password=password(‘newpass‘) where user=‘root‘; exit;
pkill msqld
service mysqld|mariadb start
不用翻墙,查google,就上 gso8.com
原文:http://my.oschina.net/u/1433007/blog/380988