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??!
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:
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: