Why MySQL Root Can Connect Without a Password and How to Fix It
This article explains why a MySQL root account may bypass password authentication, walks through common causes, demonstrates reproducing the issue, identifies the auth_socket plugin as the culprit, and shows how to switch to a native password plugin to restore proper password checks.