将mysql的root用户的密码设置为null,实现无密码登录
- 停止mysql服务
mysql.server stop - 以safe方式开启mysql
mysqld_safe –skip-grant-tables & - 链接mysql服务
mysql -u root - 更新root账户的密码
update user set authentication_string=password(‘1111’) where user=’root’ - 停止mysql服务
mysql.server stop - 重启mysql服务,并测试
mysql.server start
mysql -u root -p
本文介绍了一种临时将MySQL root用户的密码设置为空的方法,以便实现无密码登录。通过这种方式可以方便地更新root账户的密码。文章详细介绍了停止服务、以安全模式启动、连接并更新密码的步骤。
2165

被折叠的 条评论
为什么被折叠?



