Postfix, mysql, dovecot db connection issue

I'm following the instructions here:

Was able to use mysql v 8.0 after I had to update the repository for mysql.

All went well until I tested with:
sudo postmap -q mysql:/etc/postfix/

I then received a message referencing the mariadb:
postmap: warning: connect to mysql server Authentication plugin 'caching_sha2_password' cannot be loaded: /usr/lib/x86_64-linux-gnu/mariadb18/plugin/ cannot open shared object file: No such file or directory
postmap: fatal: table mysql:/etc/postfix/ query error: No such file or directory

Not sure what to do next??!

2 Replies

Linode Staff

The error you're getting is indicating that the authentication plugin isn't installed. You can get around this by changing your password encryption using the SQL command ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'YourPassword';, where YourPassword is the password you want to use for MySQL. This will change the encryption format so that it doesn't require the caching_sha2_password plugin. This should also resolve the "query error", since it looks like you're getting the query error as a result of not being able to authenticate to MySQL.

With all due respects to @jyoo, I would figure out why mysql can't find the caching_sha2_password plugin. mysql_native_passwords are not very secure:

SHA-1 was deprecated in 2011:

-- sw

Update It seems that MariaDB server doesn't yet implement the caching_sha2_password plugin:

That's really awful…it must be proprietary to Oracle! You should check this out:


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct