Mysql does not start anymore

What type of hardware are you using: VPS bought online
What YunoHost version are you running: 11.3.0.2
How are you able to access your server: The webadmin
SSH

Describe your issue

mysql does not start anymore

any idea what i could try?

Before i had some problems with the server

and did error fixes by fsck

may this cause the mysql problems now?

Any idea?
Thanks

Share relevant logs or error messages

Check this solution MariaDB keeps restarting - #4 by hovancik

1 Like

innodb_force_recovery=3 does not help - i have to set it to innodb_force_recovery=5 so that mysql starts

sudo systemctl stop mariadb

sudo nano /etc/mysql/my.cnf

edit 

[MYSQLD]
innodb_force_recovery=5

sudo systemctl start mariadb

but

sudo mysqlcheck --all-databases

just gives me

mysqlcheck: Got error: 2013: Lost connection to MySQL server during query when executing 'CHECK TABLE ... '

with

innodb_force_recovery=5

mysql starts and i could backup all YH apps

but under innodb_force_recovery=5 NO db can be deleted for a reinstall

now i’m thinking of uninstall mysql completely and do a reinstall in order to reinstall the YH backups …

If i do:

completely-uninstall-mariadb-debian-11

what is the best way to reinstall mysql by Yunohost ?

Should be a temporary fix and it can lead to future problems.

Let’s try to fix it :

Make a backup of your data directory first!

sudo cp -a /var/lib/mysql /var/lib/mysql_backup

Remove log files

sudo rm /var/lib/mysql/ib_logfile*
sudo rm /var/lib/mysql/ib_buffer_pool

Then try starting again with innodb_force_recovery at 5 then to lower values.

If it still fails, maybe the solution in the second link below can help. Dump db, drop db, restart mariadb with innodb_force_recovery set to 0 then restore the db.

the problem is that mysql does just start with

innodb_force_recovery at 5

and in this read only mode we can´t drop a db :frowning:

Do not know what do you

@jarod5001

I try this and that to get things up again


if I rename /var/lib/mysql/ibdata1 mysql starts

but of cause that is not how it should go and will really work


if by this mysql is up or by a re-installation of mysql i could try to uninstall and reinstall apps

I tried this for my hubzilla installation but than i get:

WARNING - ERROR 1698 (28000): Access denied for user 'hubzilla'@'localhost'

https://paste.yunohost.org/raw/apibuhuyoz

Do you think there is a way do add this user to mysql so that the reinstall would work?

I can’t help you with this

I suppose you have a backup.
Restart mariadb with a lower setting (4 or 3)

mysql just starts with innodb_force_recovery at 5

i have backups of apps but not of the whole system…

the snapshot of the system is from after it crashed - so i can try different things to fix things and do a reset to that point