Fork me on GitHub

Mysql修改root密码

  1. 关闭mysql服务
    1. linux下:mysql_safe --skip-grant-table
    2. window下:mysqld --skip-grant-table //高版本中无效
      • mysqld --console --skip-grant-table --shared-memory
  2. 执行update密码sql
    update mysql.user set authentication_string=password(" ") where mysql.user="root"
posted @ 2020-03-30 18:00  郑的左耳有个关  阅读(130)  评论(0编辑  收藏  举报