mysql跳过密码登陆
mysql 跳过密码登陆
关键词: skip-grant-tables
修改配置文件 my.cnf
在[mysql]后面加上
skip-grant-tables
重启数据库
systemctl restart mariadb
进入数据库 修改密码
mysql -u root -p 3306 -h xxxx
use mysql
UPDATE user SET password=PASSWORD('newpasswd') where user='root';
mysql 跳过密码登陆
关键词: skip-grant-tables
skip-grant-tables
systemctl restart mariadb
mysql -u root -p 3306 -h xxxx
use mysql
UPDATE user SET password=PASSWORD('newpasswd') where user='root';