Hello all
I starting migrating seafile from 12 to 13 today and I had a serie of problems
First the mysql upgrade script wouldn’t start because it couldn’t connect to the mysql server. I checked if I could connect with seafile@containerIP and indeed I couldn’t.
I connected as root to the mysql server and I noticed I had two seafile user :
’seafile’@’%’ : with full priviledges
’seafile’@’%.%.%.%’ : with no priviledges
I deleted the second one ’seafile’@’%.%.%.%’ and the script could connect and upgrade succesfully.
Now I can open seahub and I have access the my library list, but as soon as I connect to one I see this :
It appears you are encountering a Table 'seahub_db.base_usermonitoredrepos' doesn't exist error after upgrading your Seafile instance from version 12 to 13, which prevents you from accessing libraries in Seahub.
To resolve this issue, you can manually create the missing base_usermonitoredrepos table. Here’s how you can proceed:
Identify the correct seahub_db schema for Seafile 13.0.x:
You can find the SQL schema for seahub_db in the official Seafile GitHub repository. Navigate to the branch corresponding to your Seafile 13.0.x version. The general location is: https://github.com/haiwen/seahub/blob/master/sql/mysql.sql Replace master with the specific branch for Seafile 13.0.x if available, or check the master branch if it reflects the latest stable 13.0.x schema.
Locate the base_usermonitoredrepos table definition:
Once you have the mysql.sql file for seahub_db, search within that file for the CREATE TABLE statement corresponding to base_usermonitoredrepos. It should look similar to other CREATE TABLE IF NOT EXISTS statements in the file.
Manually create the table:
Connect to your MySQL server (or MariaDB if you are using that) as a user with sufficient privileges (e.g., the seafile user or root). Then, execute the CREATE TABLE statement you found in the mysql.sql file.
(Note: You must use the exact definition from the mysql.sql file corresponding to your Seafile 13.0.x version.)
Restart Seafile:
After successfully creating the table, restart your Seafile server and check if you can now access your libraries in Seahub.
It’s important to ensure that your database user seafile has the necessary permissions to create tables in the seahub_db database. You mentioned that you fixed a MySQL privilege issue earlier, so that should be in order. Also, ensure you are running the mysql_upgrade command as part of the overall upgrade process to align the database system tables if you are upgrading MySQL/MariaDB itself.