Would you like to learn how to configure the MariaDB service to force the use of authentication via password? In this tutorial, we are going to show you how to configure the password authentication to the ROOT user account using the command-line of a computer running Ubuntu Linux.
• Ubuntu 20
• Ubuntu 19
• Ubuntu 18
• MariaDB 10.3
Tutorial MariaDB – Configure the authentication via Password
Install the MariaDB service.
Access the MariaDB command-line.
On the authentication prompt, a password is not required.
Verify the authentication plugin and the password configured to the ROOT user account.
Here is the command output:
The MariaDB ROOT account has no password configured.
The ROOT account is using the authentication plugin named UNIX_SOCKET.
Configure a password to the ROOT account of the MariaDB service.
In our example, the password configured was KAMISAMA123.
Configure the ROOT account to use the plugin named MYSQL_NATIVE_PASSWORD.
Save your configuration and exit.
Try to access the MariaDB service using the ROOT account and the new password.
Verify the authentication plugin and the password configured to the ROOT user account.
Here is the command output:
Congratulations! You successfully enabled the MariaDB password authentication to the ROOT account.