相关文章推荐
知识渊博的帽子  ·  scrapy ...·  1 月前    · 
知识渊博的帽子  ·  Anonymous user has no ...·  8 月前    · 
知识渊博的帽子  ·  开源C# ...·  8 月前    · 
知识渊博的帽子  ·  Project Converter ...·  8 月前    · 
知识渊博的帽子  ·  [Solved] Chicken and ...·  9 月前    · 
知识渊博的帽子  ·  The Basics — CVX ...·  10 月前    · 
暗恋学妹的投影仪  ·  《spring ...·  1小时前    · 
从容的排球  ·  异常 ...·  1小时前    · 
无邪的铁板烧  ·  mybatis 操作 oracle 报错 ...·  1小时前    · 
善良的骆驼  ·  ONNX未使用GPU·  1小时前    · 
好帅的海龟  ·  轻松学pytorch之使用onnx ...·  1小时前    · 
活泼的生姜  ·  21 Markdown格式 | R语言教程·  1小时前    · 

[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)

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

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

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)

 
推荐文章
善良的骆驼  ·  ONNX未使用GPU
1小时前