Mysql5.7忘記root密碼

1、修改配置文件 #vi /etc/my.cnf 在mysqld配置模塊添加:skip-grant-tables = true,然後重啓mysql 2、登錄數據庫: mysql -uroot -S /tmp/mysql.sock 執行以下命令修改root密碼: update mysql.user set authentication_string=password(‘password’) wher
相關文章
相關標籤/搜索