ubuntu mysql 设置root密码


修改root用户的的密码。
由于mysql5.7没有password字段,密码存储在authentication_string字段中,password()方法还能用

在mysql中执行下面语句修改密码

show databases; use mysql; update user set authentication_string=PASSWORD("yourpassword") where user='root'; update user set plugin="mysql_native_password"; flush privileges; quit;

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM