日常记录|apt安装mysql默认的密码账户在哪里

sudo cat /etc/mysql/debian.cnf
在这里插入图片描述

里面的就是用户和密码,登录进去修改其他用户密码就行

  • 连接到mysql数据库
  • 修改密码123456是密码
use mysql;

update mysql.user set authentication_string=password('123456') where user='root' and Host ='localhost';   

update user set  plugin="mysql_native_password";     

flush privileges;

quit; 

猜你喜欢

转载自blog.csdn.net/weixin_44494373/article/details/112958764
今日推荐