0

I messed up. In order to save disk space, I removed mysql-000xx.bin files with Ubuntu's rm command - rather than using the mysql purge command, as I later found out.

But the damage is done now, mariadb service won't start. I had to disable logging to successfully start Mariadb, however logging is important for this server. Is there a way to "repair" the database in a way, that I can activate logging again?

5
  • Did you try to activate it again after you were successfully able to start the database again? What errors are you seeing in logs and such?
    – Seth
    Commented Nov 28, 2019 at 9:14
  • It seems you have deleted the binary logs, but the indexes for them remained still, thats why the db service not starting. Try using the RESET MASTER command, it deletes all existing binary log files and resets the binary logs index file.
    – Rattlehead
    Commented Nov 28, 2019 at 9:15
  • @Seth That does not work. here are the following error logs: i.imgur.com/izk85iA.png - when using systemctl status mariadb.service i.imgur.com/w4e6eE3.png - when using journalctl
    – Lyefyre
    Commented Dec 2, 2019 at 11:45
  • @Rattlehead sounded very good, but it did not work unfortunatly. (affected 0 rows). I assume this command should be used when logging is activated? Problem with that is, I can't even access the database to do these commands, once logging is activated...
    – Lyefyre
    Commented Dec 2, 2019 at 11:46
  • You've manually configured to put your mariadb logs into a file rather than the default which would generate a log in the journalctl output. Recommend editing your question rather than appending image based logs. Its clearer, more accessible, and might generate some useful and searchable answer for the next person with the problem.
    – danblack
    Commented May 1, 2023 at 22:45

0

You must log in to answer this question.

Browse other questions tagged .