Beruflich Dokumente
Kultur Dokumente
The Error “Plugin ‘unix_socket’ is not loaded” is commonly seen on Ubuntu 15.04/15.10/16.04 and any derivative
distributions such as Linux Mint 18. This tutorial shows how to fix it.
The Unix_Socket authentication plugin, which allows users to use OS credentials to connect to MariaDB via Unix
socket, is first supported in MariaDB 5.2.0. This plugin is not installed by default.
mysql -u root -p
My Ubuntu system has a user named linuxbabe , so I create a MariaDB user linuxbabe identified via the
unix_socket plugin.
https://www.linuxbabe.com/mariadb/plugin-unix_socket-is-not-loaded-2 1/4
4/2/2018 How to Fix MariaDB Plugin 'unix_socket' is not loaded Error
And now I can log into MariaDB monitor as user linuxbabe without typing password because I already logged into
Ubuntu system as linuxbabe.
The Unix_Socket authentication plugin only works when your Linux OS and MariaDB have a user account with
the same username.
Your Linux OS has a root user. MariaDB also has a root user. So sometimes, when you try to log into MariaDB
monitor as root user, MariaDB may authenticate you via the Unix_Socket plugin but this plugin is not installed by
default. So you see Plugin 'unix_socket' is not loaded Error.
Another authentication plugin is mysql_native_password . MariaDB uses this plugin to authenticate a user
who is created with this command:
https://www.linuxbabe.com/mariadb/plugin-unix_socket-is-not-loaded-2 2/4
4/2/2018 How to Fix MariaDB Plugin 'unix_socket' is not loaded Error
To fix the above error, we can tell MariaDB to use mysql_native_password plugin to authenticate root user.
First stop MariaDB. If you have installed MariaDB from Ubuntu repository, use this command to stop it.
If you have installed MariaDB from MariaDB repository, use the following command to stop it.
Then start MariaDB with --skip-grant-tables option which bypass user authentication.
mysql -u root
Enter the following SQL statement to check which authentication plugin is used for root.
https://www.linuxbabe.com/mariadb/plugin-unix_socket-is-not-loaded-2 3/4
4/2/2018 How to Fix MariaDB Plugin 'unix_socket' is not loaded Error
You might see it’s using unix_socket plugin. To change it to mysql_native_password plugin, execute this
command:
If you forgot the MariaDB root user password, you can also change the root password now with the following
command:
flush privileges;
quit;
Stop mysqld_safe
https://www.linuxbabe.com/mariadb/plugin-unix_socket-is-not-loaded-2 4/4