无密码root帐号登陆
/usr/bin/mysql -uroot -p
#在下面的要求你输入密码的时候,你不用管,直接回车键一敲就过去了mysql> use mysql;mysql> update user set password=password("guxxxxxahyVh") where user='root' and host='localhost';mysql> flush privileges;
本文介绍了一种在没有密码的情况下使用root用户登录MySQL的方法,并演示了如何更新root用户的密码,确保系统的安全性。
无密码root帐号登陆
/usr/bin/mysql -uroot -p
#在下面的要求你输入密码的时候,你不用管,直接回车键一敲就过去了mysql> use mysql;mysql> update user set password=password("guxxxxxahyVh") where user='root' and host='localhost';mysql> flush privileges;
1237
2852

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