如何设置mysql的登录密码?

设置方法:1、使用“set password =password(‘你的密码’);”命令;2、使用“update user set password=password(‘你的密码’) where user=’root’;”命令。

如何设置mysql的登录密码?

mysql设置密码

有很多方法:

1、用root进入mysql

mysql>set password =password('你的密码'); mysql>flush privileges;

2、使用GRANT语句

mysql>grant all on *.* to 'root'@'localhost' IDENTIFIED BY '你的密码'with grant option ;  mysql>flush privileges;

3、进入mysql库修改user表

mysql>use mysql; mysql>update user set password=password('你的密码') where user='root'; mysql>flush privileges;

推荐教程:mysql视频教程

以上就是如何设置

© 版权声明
THE END
喜欢就支持一下吧
点赞13 分享