问题原文
原帖链接 · MediumMatrix · CC BY-SA 4.0
I installed the following mysql client on my server 'mysql Ver 8.0.25-0ubuntu0.20.04.1 for Linux on x86_64 ((Ubuntu))' and went through mysql_secure_installation steps and set the password as asked through this process. In the shell im logged in as root, I wonder if this has anything to do with mysql not asking for a pasword when I use put this command? Basically, i type mysql into my terminal, and I get mysql - not promting for any passwords.
已采纳解答
原帖链接 · Tero Kilkanen · CC BY-SA 4.0
The reason is that MySQL uses socket authentication option by default for the root user.
If you want to disable it, you need to change Authentication plugin for the root account from "Socket authentication" to "Native MySQL authentication".
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
