#關閉mysql服務mysql
service mysql stopsql
mysqld_safe --skip-grant-tables &ip
#登入mysqlit
mysqltable
mysql>use mysqlservice
#修改密碼密碼
mysql>UPDATE user SET password=password("password") where user='root';top
mysql>flush privileges;word
mysql>exit;tab