读好书,交益友
分类: Mysql/postgreSQL
2022-07-25 16:48:36
systemctl stop mysqld
systemctl set-environment MYSQLD_OPTS=--skip-grant-tables
systemctl start mysqld
mysql> UPDATE mysql.user SET authentication_string = PASSWORD ('ENTER_NEW_PASSWORD') WHERE User = 'root' AND Host = 'localhost'; mysql> FLUSH PRIVILEGES; mysql> quit
systemctl stop mysqld
systemctl unset-environment MYSQLD_OPTS
systemctl start mysqld