Why let MySQL as root with any password?

The problem is:
There Are Debian

Debian GNU/Linux 10 (buster)


and mysql


mariadb Ver 15.1 Distrib 10.4.12-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2


after installing mariadb fulfilled

mysql_secure_installation


Asked the password, and overloaded privileges. As root user:

mysql-uroot -p

let the password without a password and with an incorrect password. In the logs no errors
April 7th 20 at 15:52
1 answer
April 7th 20 at 15:54
Unfortunately this solution did not help. Solved the problem by reading the documentation from off site mariadb
we had so
ALTER USER root@localhost IDENTIFIED VIA mysql_native_password;
SET PASSWORD = PASSWORD('foo');
- alphonso_Ki commented on April 7th 20 at 15:57
@Ashleigh77, add plz reply and check the solution, suddenly someone come in handy - Lexie44 commented on April 7th 20 at 16:00

Find more questions by tags DebianMySQL