mysql after losing root password

When you lose the root password, you can do this

  mysqld_safe --skip-grant-tables&

  mysql -u root mysql

  mysql> UPDATE user SET password=PASSWORD("new password") WHERE user='root';

  mysql> FLUSH PRIVILEGES; please respect For more information, please refer to http://www.cezuwang.com/listFilm?page=1&areaId=906&filmTypeId=1 When running mysql, it prompts that Table 'performance_schema.session_variables' doesn't exist The solution is: Step 1: Enter in the administrator command: mysql_upgrade -u root -p --force Step 2: Restart the mysql service: net stop mysqlnet start mysql Run mysql again, and it will be solved. Note that both steps are indispensable.

    









 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327003352&siteId=291194637