Go fileserver access denied [solved]

Hi, I have weird issue while trying to enable the “go fileserver”.



The error:

[2023-02-01 17:14:24] Failed to get email by token e52b5d7bfd1token: Error 1045: Access denied for user 'user'@'localhost' (using password: YES)
[2023-02-01 17:14:24] path /accessible-repos/ internal server error: Error 1045: Access denied for user 'user'@'localhost' (using password: YES)


[2023-02-01 21:53:09] failed to prepare sql : SELECT r.repo_id, b.commit_id, v.origin_repo, v.path, v.base_commit FROM Repo r LEFT JOIN Branch b ON r.repo_id = b.repo_id LEFT JOIN VirtualRepo v ON r.repo_id = v.repo_id WHERE r.repo_id = ? AND b.name = 'master'       ^zError 1045: Access denied for user 'user'@'localhost' (using password: YES)

One more error I’v encountered while testing:

2023-02-01 22:41:01 ../common/seaf-db.c(732): Failed to connect to MySQL: Plugin caching_sha2_password could not be loaded: /usr/lib/mariadb/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory

Why does it look for shared lib in /usr/lib/mariadb ? While I do not have mariadb ?

The priviledges are granted:

mysql> show grants for 'user'@'localhost';
| Grants for user@localhost                                    |
| GRANT USAGE ON *.* TO `user`@`localhost`                     |
| GRANT ALL PRIVILEGES ON `ccnet-db`.* TO `user`@`localhost`   |
| GRANT ALL PRIVILEGES ON `seafile-db`.* TO `user`@`localhost` |
| GRANT ALL PRIVILEGES ON `seahub-db`.* TO `user`@`localhost`  |

For testing purposes I have also tried root mysql user but the problem was exactly same.

Also i can manually do the query without issues on console, like:

mysql -u user -p
mysql> use seafile-db;
mysql> select email from RepoUserToken;

and i get list of emails.

The weird thing is that python fileserver works, anyone have idea where is the problem ?

Seafile server community version 9.0.10, Mysql community version 8.0.32.

I have fixed the “Plugin caching_sha2_password could not be loaded” error like:

apt install libmariadb3
mkdir /usr/lib/mariadb
mkdir /usr/lib/mariadb/plugin
ln -sf /usr/lib/x86_64-linux-gnu/mariadb19/plugin/caching_sha2_password.so /usr/lib/mariadb/plugin/caching_sha2_password.so

which allow me to login while authentication_plugin for the mysql user use caching_sha2_password, but “Error 1045: Access denied” still persist. It seems like go-fileserver does sent password in wrong format but it’s not mysql_native_password niether caching_sha2_password and only after the initial connection is made (which is successful).

Solved, issue was caused by special character in password, the character was #. So it was considered as comment.