mysql 5 7安裝後無root密碼的解決

2021-09-03 02:59:10 字數 313 閱讀 9464

由於某些原因需要重新安裝mysql5.7(ubuntu 18.04),在安裝完成後發現怎麼也無法使用root 登入,由於在安裝時並沒有提示輸入密碼,按照mysql的文件,應該是自動生成了乙個隨機密碼,

[warning] root@localhost is created with an empty password ! please consider switching off the --initialize-insecure option.

可在error.log 檔案中發現,安裝過程中也沒有生成密碼,於是繼續看文件,發現

參考鏈結

Mysql 5 7安裝 非root使用者

wgetchmod u w etc sudoers vim etc sudoers chmod u w etc sudoers解壓檔案 tar zvxf mysql 5.7.28 linux glibc2.12 x86 64.tar.gz mv mysql 5.7.28 linux glibc2.1...

無公網環境編譯安裝mysql5 7

將映象上傳到伺服器,掛載映象,mount centos 7 x86 64 everything 1708.iso centos7.4 配置yum源,vim etc yum.repos.d centos.repo i.name centos el7 tsinghua ii.baseurl file i...

mysql5 7 修改root 密碼

假如忘記mysql的root 密碼是什麼之後如何修改密碼 我的mysql是自己原始碼安裝的,mysql.server存放在 usr local mysql support files檔案當中 1 先關閉mysql usr local mysql support files mysql.server ...