You are not logged in.

#1 2022-08-28 12:56:15

Laserpithium
Member
Registered: 2010-03-28
Posts: 25

[Solved] Chicken and egg issue with Mariadb?

Hello to all,

An upgrade of Mariadb did not go well (or more probably, I failed to run a mysql_upgrade -u root -p before rebooting).
Consequence: I am now unable to start mariadb.service:

gilgamesh@uruk ~ $ sudo systemctl start mariadb.service
Job for mariadb.service failed because the control process exited with error code.
See "systemctl status mariadb.service" and "journalctl -xeu mariadb.service" for details.

When I try to see the log, I got mostly the following error message:

'mysql.plugin' doesn't exist". Some plugins may be not loaded

I thus went under archlinux wiki, and apply the guidelines on the Mariadb "troubleshooting" section:

gilgamesh@uruk ~ $ sudo mysqld_samysqld_safe --datadir=/var/lib/mysql/
220828 14:46:53 mysqld_safe Logging to '/var/lib/mysql//uruk.err'.
220828 14:46:53 mysqld_safe Starting mariadbd daemon with databases from /var/lib/mysql/
gilgamesh@uruk ~ $ sudo mysql_upgrade -u root -p
Enter password: 
Reading datadir from the MariaDB server failed. Got the following error when executing the 'mysql' command line client
ERROR 2002 (HY000): Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
FATAL ERROR: Upgrade failed

I tried as well a reinstall of mariadb, without any improvement of the situation.
And there I am stuck. I have the feeling to be trapped in some kind of chicken and egg issue, where we need to have mariadb running to be able to run the mysql_upgrade stuff, but at the same time need to run the mysql_upgrade command to be able to launch the service...

To be noted I have this issue on a up-to-date Archlinux version.

Thanks.

Last edited by Laserpithium (2022-08-30 10:47:57)

Offline

#2 2022-08-28 17:54:40

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [Solved] Chicken and egg issue with Mariadb?

Just downgrade mariadb, run the mysql-upgrade command and then update.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2022-08-29 17:47:05

Laserpithium
Member
Registered: 2010-03-28
Posts: 25

Re: [Solved] Chicken and egg issue with Mariadb?

Tried that, even coming back several versions backward (in case I missed the issue longer than I thought).
No improvement, still exactly the same error message, whatever the version...

Offline

#4 2022-08-29 17:53:41

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,449
Website

Re: [Solved] Chicken and egg issue with Mariadb?

Does that socket exist?  If so, run `stat` on it and report the results here.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2022-08-30 10:47:05

Laserpithium
Member
Registered: 2010-03-28
Posts: 25

Re: [Solved] Chicken and egg issue with Mariadb?

After deep-diving the case on the net, I came to the conclusion that the database was most probably corrupted.
So I removed the ib* file in /var/lib/mysql, and reinstalled Mariadb, which solved the issue.
Had to reinstall Akonadi as well and reimport all my emails into Kmail, but that's no big deal.

Thanks to the people sharing some tips and help.

Last edited by Laserpithium (2022-08-30 10:47:37)

Offline

Board footer

Powered by FluxBB