killall -TERM mysqld --------------命令来杀死正在运行的mysql
/usr/bin/mysql_safe --skip-grant-tables ------------- 启动mysql
mysql -------------------------------------------------登陆mysql
mysql> UPDATE user SET Password=PASSWORD('toor') where USER='root';
----------------------------------------设置mysql的root用户密码toor
/etc/init.d/mysqld restart ----------------------------重启mysql
mysql -u root -p ----------------------------------root登陆mysql