After completing a long-overdue upgrade of database software from MariaDB 5.5 to 10.2 and cleaning up the broken pieces, I discovered that it is not necessary to enter a password for the root user from the command line any more.
In researching how to fix this, it was apparent that there are two sides to the issue.
Searching further for the reason, I found the a file .my.cnf in the root directory with user and password. Aha!
Considering the server has disabled root "password" login (key only), is this opening a vulnerability? Is is mainly for the convenience?
Thanks for adding your view!
David
Code:
# mysql
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 44
Server version: 10.2.19-MariaDB MariaDB Server
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> SELECT user,host,password FROM mysql.user WHERE user='';
Empty set (0.00 sec)
MariaDB [(none)]>
Searching further for the reason, I found the a file .my.cnf in the root directory with user and password. Aha!
Code:
# cat ~/.my.cnf
[client]
password="<the password>"
user=root
[mysqld]
#
Thanks for adding your view!
David