Comments - MariaDB Galera Cluster - Known Limitations

4 years, 3 months ago Testing User A Test

I have executed the following command: SHOW CREATE USER 'root'@'localhost'

It returned with the following result: +--------------------------------------------------------------------------------------------------------------------------------------+

CREATE USER for root@localhost

+--------------------------------------------------------------------------------------------------------------------------------------+

CREATE USER 'root'@'localhost' IDENTIFIED VIA mysql_native_password USING '*598A9A9B432F616F4.....' OR unix_socket

+--------------------------------------------------------------------------------------------------------------------------------------+

It seems the authentication plugin is mysql_native_password. What I should do now?

 
4 years, 3 months ago Daniel Black

"OR unix_socket". This means if you are root unix user, no authentication password is needed. If you aren't the root user, then it will ask for a password.

So this is behaving as expected.

 
4 years, 3 months ago Testing User A Test

How may I remove "OR unix_socket" option?

 
4 years, 3 months ago Ian Gilfillan

Take a look at Authentication from MariaDB 10.4 which explains how to revert back to the old password authentication method.

 
4 years, 3 months ago Daniel Black

There's nothing to rectify. Your initial `mysql -u root -p` before you restarted was executed as a non-root user. Since your restart you ran it as root. The restart of the server in no-way impacted this.

There is no risk in having a root user access the server without a password. A root unix user already has total control over the entire system.

MariaDB package update scripts may depend on a unix_socket authenticated root user and a passwordless root and so do logrotate scripts.

Recommend action. Do nothing. You are not insecure.

 
4 years, 3 months ago Testing User A Test

Your statement, ' Your initial `mysql -u root -p` before you restarted was executed as a non-root user', seems not true. I login the system as 'root' OS user. Then I issued the command, 'mysql -u root -p'.

  1. mysql -u root -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 15 Server version: 10.4.12-MariaDB MariaDB Server

Copyright © 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]>

No password required!. The process was owned by 'root'.

  1. ps -ef|grep mysql mysql 4404 1 7 16:27 ? 00:00:41 /usr/sbin/mysqld --wsrep_start_position=5772dcbb-98b8-11ea-94f8-037e8c2f9cc3:95 root 4719 4568 0 16:35 pts/1 00:00:00 mysql -u root -p root 4741 4182 0 16:35 pts/0 00:00:00 grep --color=auto mysql
 
4 years, 3 months ago Testing User A Test

I don't understand why it is normal. I started MariaDB as root user. But I should be able to assign a password for 'root' db user, not OS root user. After I assigned a password to root db user, it kept asking me to input root password for CLI login.

But when I stopped and started the db, the root db password gone!!! To my understanding, the password should be kept on the database. Why the action of restarting db erase the root db password on database?

 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.