Update to yunohost 2.4 / debian jessie failed - [Update] Database migration not working

,

It seems like it’s working, I can’t test it right now but I will come soon with more information.
Thanks a lot for your help ! :slight_smile:

I think the real solution was to do apt-get autoremove before to upgrade to jessie and to remove yunohost tahoe config package .

That’s what I did.

So now I’m using the latest 2.4 version, it’s working well in the administration part ! :slight_smile:
(thanks again ;))

But it seems like the database has not been updated correctly. I’m not able the start mysql, and all the app using database are no working.
If I understood well, yunohost switched to another database, right ? How can I migrate from one to the other ?

Also the backup is working only for freshrss (it use database) and kandboard (I’m not sure it use it). No backup for the other, with or without database usage. Looks like it’s not related.

Up ! :slight_smile:

Just to reformulate my problem, the update to 2.4 is now done, but mysql service can’t start, and AFAIK the database should have switch to another one, and it’s not the case.

I just renamed the topic, it should be clear now.

I think mariadb use the same dir than mysql.

You should check /var/log/mysql.log

It’s completely empty.

Sorry it seems mysql log are in another place:

tail /var/lib/mysql/SERVERNAME.DOMAIN.err

Ok, so here is the file content:

InnoDB: Reading tablespace information from the .ibd files…
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer…
InnoDB: Waiting for the background threads to start
InnoDB: 5.5.49 started; log sequence number 450371106
[Note] Server hostname (bind-address): ‘0.0.0.0’; port: 3306
[Note] - ‘0.0.0.0’ resolves to ‘0.0.0.0’;
[Note] Server socket created on IP: ‘0.0.0.0’.
[ERROR] Fatal error: Can’t open and lock privilege tables: Incorrect file format 'host’
mysqld_safe mysqld from pid file /var/lib/mysql/SERVERNAME.DOMAIN…pid ended

Thanks again for your help :wink:

After some more tests I confirm that every app needing a database is not working, and the others just work fine.

I am not sure but did you try this ?

In one terminal, run

$ sudo mysqld --skip-grant-tables

Open another terminal and execute these commands

$ mysql
mysql> use mysql
mysql> repair table host use_frm;
mysql> exit

And restart the mysql service

$ sudo service mysql restart

The idea is to fix your broken table.
Have you done a hard reboot? maybe power extinction ?

With the first command I have this error:

[Note] mysqld (mysqld 5.5.49-0+deb7u1) starting as process 31667 …
[ERROR] Fatal error: Please read “Security” section of the manual to find out how to run mysqld as root!

[ERROR] Aborting

[Note] mysqld: Shutdown complete

And trying to use mysql command anyway just raise the same error message as trying to start the service (which seems logical, as it is not started).
I also can’t reload mysql service.

Oh and I forgot this:

Have you done a hard reboot? maybe power extinction ?

I can’t, I’m using ssh, I don’t have the raspberry with me.
Only soft reboot right now.

Ok after a quick research, it’s solved by usingsudo -u mysql before the command.

If I dosudo -u mysql mysqld:

[Note] mysqld (mysqld 5.5.49-0+deb7u1) starting as process 1578 …
[Note] Plugin ‘FEDERATED’ is disabled.
mysqld: Incorrect file format ‘plugin’
[ERROR] Can’t open the mysql.plugin table. Please run mysql_upgrade to create it.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use GCC atomic builtins
InnoDB: Compressed tables use zlib 1.2.7
InnoDB: Using Linux native AIO
InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: Completed initialization of buffer pool
InnoDB: highest supported file format is Barracuda.
InnoDB: Waiting for the background threads to start
InnoDB: 5.5.49 started; log sequence number 450371106
[Note] Server hostname (bind-address): ‘0.0.0.0’; port: 3306
[Note] - ‘0.0.0.0’ resolves to ‘0.0.0.0’;
[Note] Server socket created on IP: ‘0.0.0.0’.
[ERROR] Fatal error: Can’t open and lock privilege tables: Incorrect file format ‘host’

and sudo mysqld --skip-grant-tables:

[Note] mysqld (mysqld 5.5.49-0+deb7u1) starting as process 1627 …
[Note] Plugin ‘FEDERATED’ is disabled.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use GCC atomic builtins
InnoDB: Compressed tables use zlib 1.2.7
InnoDB: Using Linux native AIO
InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: Completed initialization of buffer pool
InnoDB: highest supported file format is Barracuda.
InnoDB: Waiting for the background threads to start
InnoDB: 5.5.49 started; log sequence number 450371106
[Note] Server hostname (bind-address): ‘0.0.0.0’; port: 3306
[Note] - ‘0.0.0.0’ resolves to ‘0.0.0.0’;
[Note] Server socket created on IP: ‘0.0.0.0’.
[ERROR] mysqld: Can’t find file: ‘./performance_schema/events_waits_current.frm’ (errno: 13)
[ERROR] Native table ‘performance_schema’.‘events_waits_current’ has the wrong structure
[ERROR] mysqld: Can’t find file: ‘./performance_schema/events_waits_history.frm’ (errno: 13)
[ERROR] Native table ‘performance_schema’.‘events_waits_history’ has the wrong structure
[ERROR] mysqld: Can’t find file: ‘./performance_schema/events_waits_history_long.frm’ (errno: 13)
[ERROR] Native table ‘performance_schema’.‘events_waits_history_long’ has the wrong structure
[ERROR] mysqld: Can’t find file: ‘./performance_schema/setup_consumers.frm’ (errno: 13)
[ERROR] Native table ‘performance_schema’.‘setup_consumers’ has the wrong structure
[ERROR] mysqld: Can’t find file: ‘./performance_schema/setup_instruments.frm’ (errno: 13)
[ERROR] Native table ‘performance_schema’.‘setup_instruments’ has the wrong structure
[ERROR] mysqld: Can’t find file: ‘./performance_schema/setup_timers.frm’ (errno: 13)
[ERROR] Native table ‘performance_schema’.‘setup_timers’ has the wrong structure
[ERROR] mysqld: Can’t find file: ‘./performance_schema/performance_timers.frm’ (errno: 13)
[ERROR] Native table ‘performance_schema’.‘performance_timers’ has the wrong structure
[ERROR] mysqld: Can’t find file: ‘./performance_schema/threads.frm’ (errno: 13)
[ERROR] Native table ‘performance_schema’.‘threads’ has the wrong structure
[ERROR] mysqld: Can’t find file: ‘./performance_schema/events_waits_summary_by_thread_by_event_name.frm’ (errno: 13)
[ERROR] Native table ‘performance_schema’.‘events_waits_summary_by_thread_by_event_name’ has the wrong structure
[ERROR] mysqld: Can’t find file: ‘./performance_schema/events_waits_summary_by_instance.frm’ (errno: 13)
[ERROR] Native table ‘performance_schema’.‘events_waits_summary_by_instance’ has the wrong structure
[ERROR] mysqld: Can’t find file: ‘./performance_schema/events_waits_summary_global_by_event_name.frm’ (errno: 13)
[ERROR] Native table ‘performance_schema’.‘events_waits_summary_global_by_event_name’ has the wrong structure
[ERROR] mysqld: Can’t find file: ‘./performance_schema/file_summary_by_event_name.frm’ (errno: 13)
[ERROR] Native table ‘performance_schema’.‘file_summary_by_event_name’ has the wrong structure
[ERROR] mysqld: Can’t find file: ‘./performance_schema/file_summary_by_instance.frm’ (errno: 13)
[ERROR] Native table ‘performance_schema’.‘file_summary_by_instance’ has the wrong structure
[ERROR] mysqld: Can’t find file: ‘./performance_schema/mutex_instances.frm’ (errno: 13)
[ERROR] Native table ‘performance_schema’.‘mutex_instances’ has the wrong structure
[ERROR] mysqld: Can’t find file: ‘./performance_schema/rwlock_instances.frm’ (errno: 13)
[ERROR] Native table ‘performance_schema’.‘rwlock_instances’ has the wrong structure
[ERROR] mysqld: Can’t find file: ‘./performance_schema/cond_instances.frm’ (errno: 13)
[ERROR] Native table ‘performance_schema’.‘cond_instances’ has the wrong structure
[ERROR] mysqld: Can’t find file: ‘./performance_schema/file_instances.frm’ (errno: 13)
[ERROR] Native table ‘performance_schema’.‘file_instances’ has the wrong structure
[Note] mysqld: ready for connections.
Version: ‘5.5.49-0+deb7u1’ socket: ‘/var/run/mysqld/mysqld.sock’ port: 3306 (Debian)

Could it be a problem with the 0.0.0.0 address used ? Shouldn’t it be the loopback at 127.0.0.1 ?

Up ! :slight_smile:

If your firewall block the port 3306 it shouldn’t be really a problem.

It’s blocked indeed.

Any idea about how to solve this issue ? Is there any way to “reconstruct” the database ? (without loosing everything if possible ^^)

did you tried to access you r database after doing sudo mysqld --skip-grant-tables ?
You can try this
sudo mysql -u root -p

The password is root or is inside /etc/yunohost/mysql

None of the solution are working, same error :confused: