mysql -- access with no user/passwd

Jeffrey Walton noloader at gmail.com
Sun Jul 7 03:00:22 UTC 2024


On Sat, Jul 6, 2024 at 8:46 PM bruce <badouglas at gmail.com> wrote:
>
> Just realized. Set up a test mysql for 20.0.4 and I can access mysq
> from the cmdline
>
>  mysql
> allows access with no user/passwd

If I am not mistaken, `mysql` is just the command interpreter. You
have not connected to any databases.

> Does anyone have pointers to disable this??

If you are working from the command line, you will need `mysql`.

>  mysql_secure_installation
>
> doesn't seem to work from the cmdline/reboot.

You need `mysql_secure_installation` to set the root password. It also
performs other hardening, like dropping the test database.

What did you expect it to do that it did not perform?

Jeff



More information about the ubuntu-users mailing list