Postfix, mysql, dovecot db connection issue

I'm following the instructions here:https://www.linode.com/docs/email/postfix/email-with-postfix-dovecot-and-mysql/

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 farrick.org mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf

I then received a message referencing the mariadb:
postmap: warning: connect to mysql server 127.0.0.1: Authentication plugin 'caching_sha2_password' cannot be loaded: /usr/lib/x86_64-linux-gnu/mariadb18/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory
postmap: fatal: table mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf: 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:

https://mariadb.com/kb/en/authentication-plugin-mysql_native_password/

SHA-1 was deprecated in 2011:

https://en.wikipedia.org/wiki/SHA-1

-- sw

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

https://mariadb.com/kb/en/authentication-plugin-sha-256/

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

https://mariadb.com/kb/en/authentication-plugin-ed25519/

Reply

Please enter an answer
Tips:

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] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct