1. 程式人生 > 其它 >日常記錄|apt安裝mysql預設的密碼賬戶在哪裡

日常記錄|apt安裝mysql預設的密碼賬戶在哪裡

技術標籤:資料庫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;