haiwen / seafile-docker

A Docker image for Seafile server
Other
544 stars 183 forks source link

Seafile can't connect to Mysql with IPv6 #229

Open ki2007 opened 4 years ago

ki2007 commented 4 years ago

If IPv6 is enabled for the seafile network, seafile can't connect to the database server.

Issue: The initial setup creates an mysql user named seafile with an user_host of '%.%.%.%' which does not allow the user to connect with an IPv6 connection.

Solution: Set user_host of seafile user to '%' or an reasonable alternative to allow connections from IPv6 hosts.

tohn commented 3 years ago

Hey @ki2007, I just ran into this issue. Could you please explain in more detail how to solve this?

joachimtingvold commented 2 years ago

PR that fixes this submitted (#288).

As a workaround;

  1. Set the IPv4 address of the MariaDB-container as the value for DB_HOST during setup.
  2. Wait until everything is working.
  3. Edit sql user on the MariaDB-container; rename user 'seafile'@'%.%.%.%' to 'seafile'@'%';
  4. Change DB_HOST to the hostname.
  5. Change host manually in the seafile configs (ccnet.conf, seafile.conf and seahub_settings.py)