Seahub not starting due to MySQL connection error

Hi all,

I’ve a Seafile 8 installed on a raspberry pi working fine since today. I’ve restarted the system and suddenly Seahub does not start:

LC_ALL is not set in ENV, set to en_US.UTF-8
/opt/seafile/seafile-server-latest/ línea 210: aviso: setlocale: LC_ALL: no se puede 
cambiar el local (en_US.UTF-8): No existe el fichero o el directorio
Starting seahub at port 8000 ...
Error:Seahub failed to start.
Please try to run "./ start" again

The first alerts regarding LC_ALL and UTF-8 are expected, allways been there.

If I go to the logs, I can see the error in seahub log:

 File "/opt/seafile/seafile-server-8.0.7/seahub/thirdpart/MySQLdb/", line 185, in __init__
super().__init__(*args, **kwargs2)
django.db.utils.OperationalError: (2002, "Can't connect to MySQL server on '' (115)")

I’ve checked the /opt/seafile/conf/ and the server IP is the, database name, user, password are all OK. I’ve reset the password for the seafile user in MySQL (MariaDB 10), but still not able to login (I don’t know if it is expected):

sudo mysql -u seafile -p
Enter password:
ERROR 1698 (28000): Access denied for user 'seafile'@'localhost'

Any idea how to proceed?


By the way, I’ve a backup of MySQL database from months ago. I’ve not added/removed libraries nor uses, I’ve just added and modified files in the default admin library.

Can I restore the mysql databases backup safely? Or it would break seafile?


Hi all,

I’ve finally found the issue with MySQL (MariaDB 10). By any unknown reason, seems that seafile is using and root is using localhost as server.

I went to the path


And edited the file 50-server.cnf, adding a # into the bind-address =

After a reboot of MySQL, Seahub started.


1 Like