Forgot your password data mysql database

Forgot your password database

  • 1, / etc / my.cof file, add a first row skip-grant-tables
  • 2, restart the service systemctl restart mysqld
  • 3, mysql does not require a password to log
  • 4, modify the password set password = password ( '123123');
  • 5, refresh flush privileges;
  • 6, commented /etc/my.cof file, add a line # skip-grant-tables
  • 7, restart the service systemctl restart mysqld

Guess you like

Origin www.cnblogs.com/jiangyatao/p/11008434.html