Seafile can't establish connection to Mysql --> not found

Ok, so I moved seafile to a new server. I am using pro edition, so I set the new server as the backup server, let everything sync overnight. Basically I folllowed the steps outlined in the manual.

Everything seemed to work, so I removed the [backup] setting from the conf, everything working, great.

Now, one night later, it’s not working anymore, all clients were logged out, and I couldn’t log in with my admin. I tried to restart, and all I get is this error:
[06/27/20 11:50:47] …/common/ccnet-db.c(590): Failed to connect to MySQL: Plugin caching_sha2_password could not be loaded: lib/mariadb/plugin/ cannot open shared object file: No such file or directory

Googling this error, it seems it’s got something to do with the password of the mysql user. I changed it with the mysql_native_password setting, but no luck. I tried to delete the mysql user, create it again, grant all the privileges on the databases, nothing. Other applications that are using mysql are not afflicted.

Does anybody have any idea how to solve this problem?

Hey VictorG,
today I stumpled upon the same problem. The reason for that is that with mysql 8.0 the default password plugin is changed from “mysql_native_password” to “caching_sha2_password”. Seafile is not the only software that struggles with this change.

Here is what you can do:

  1. connect to your mysql-database and change the password plugin with the following code
  2. ALTER USER ‘seafile’@‘’ IDENTIFIED WITH mysql_native_password BY ‘your-password’;

Now it should work.
Another solution could be to add “default_authentication_plugin=mysql_native_password” to the section [mysqld] in your mysql configuration file (typically /etc/mysql/my.cnf)

Than all new sql users will use again mysql_native_password and there will be no trouble.
Best regards

1 Like

I just stumbled upon this problem again and after googling it was surprised that somebody with the same name as me had the same problem :joy: turns out it was past me.

Thanks a ton for the reply. It solved the problem!