清空MySQL密码
更改数据库配置文件 # vi /etc/my.cnf 添加 skip-grant-tables 重启数据库 # service mysql restart# flush privileges;
授权数据库访问
进入数据库 # mysql -u root -p # use mysql # grant all privileges on *.* to ‘root‘@‘%’ identifed by ‘password‘ with grant option; # flush privileges;
时间: 2024-10-11 03:01:31