Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bashizip/ec2c6c6eba4971405c96f349e7f97d50 to your computer and use it in GitHub Desktop.
Save bashizip/ec2c6c6eba4971405c96f349e7f97d50 to your computer and use it in GitHub Desktop.
MariaDB switch to mysql_native_password

Switch to mysql_native_password plugin

By default MariaDB use the unix_socket plugin to authenticate users.

But it's easier to use mysql_native_password for dev (and only for dev because it's way less secure).

Get root access

sudo su

Connect to mysql

mysql

Run this query

update mysql.user set plugin = 'mysql_native_password' where User = 'root';

And then

flush privileges;

Enjoy !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment