0

I finally upgraded to the new ubuntu lts version, but had several problems before it finally worked (I removed python 2.7 for it to finally install - don't know if this is maybe relevant so just in case mentioning it) After the upgrade, mysql server won't start anymore. Here's what it says when I try to start the service:

sudo service mysql start
Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xe" for details.

So I did what it said and here's the output:

mysql.service - MySQL Community Server
     Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Thu 2021-04-22 13:56:54 CEST; 3min 40s ago
    Process: 41942 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/S>
    Process: 41950 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)
   Main PID: 41950 (code=exited, status=1/FAILURE)
     Status: "Server startup in progress"
      Error: 13 (Keine Berechtigung)

Apr 22 13:56:54 Eagle1 systemd[1]: mysql.service: Scheduled restart job, restart counter is at 5. Apr 22 13:56:54 Eagle1 systemd[1]: Stopped MySQL Community Server. Apr 22 13:56:54 Eagle1 systemd[1]: mysql.service: Start request repeated too quickly. Apr 22 13:56:54 Eagle1 systemd[1]: mysql.service: Failed with result 'exit-code'. Apr 22 13:56:54 Eagle1 systemd[1]: Failed to start MySQL Community Server.

(I omitted the journalctl because I'm told this looks like spam when I try to publish the question...)

I also looked into the mysql error log:

The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
2021-04-22T11:38:01.333568Z 0 [Warning] [MY-010915] [Server] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
2021-04-22T11:38:01.335329Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.23-0ubuntu0.20.04.1) starting as process 39829
2021-04-22T11:38:01.350627Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-04-22T11:38:18.418327Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2021-04-22T11:38:18.419740Z 1 [ERROR] [MY-011014] [Server] Found partially upgraded DD. Aborting upgrade and deleting all DD tables. Start the upgrade process again.
2021-04-22T11:38:29.263168Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2021-04-22T11:38:29.263780Z 0 [ERROR] [MY-010119] [Server] Aborting
2021-04-22T11:38:31.046567Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.23-0ubuntu0.20.04.1)  (Ubuntu).
2021-04-22T11:38:31.772509Z 0 [Warning] [MY-010915] [Server] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
2021-04-22T11:38:31.774516Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.23-0ubuntu0.20.04.1) starting as process 40214
2021-04-22T11:38:31.789130Z 1 [System] [MY-011012] [Server] Starting upgrade of data directory.
2021-04-22T11:38:31.789302Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-04-22T11:38:38.740093Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2021-04-22T11:38:58.298341Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '127.0.0.1' port: 33060, socket: /var/run/mysqld/mysqlx.sock
2021-04-22T11:38:58.298953Z 0 [Warning] [MY-013129] [Server] A message intended for a client cannot be sent there as no client-session is attached. Therefore, we're sending the information to the error-log instead: MY-001287 - 'validate password plugin' is deprecated and will be removed in a future release. Please use validate_password component instead
11:39:54 UTC - mysqld got signal 11 ;
Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.
Thread pointer: 0x55c9e366d370
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 7fee0238eca0 thread_stack 0x46000
/usr/sbin/mysqld(my_print_stacktrace(unsigned char const*, unsigned long)+0x41) [0x55c9df1c6961]
/usr/sbin/mysqld(handle_fatal_signal+0x31b) [0x55c9ddff1e0b]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x153c0) [0x7fee0f2473c0]
/usr/sbin/mysqld(+0x273cca7) [0x55c9df605ca7]
/usr/sbin/mysqld(dict_load_table(char const*, bool, dict_err_ignore_t, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const*)+0x3ee) [0x55c9df60781e]
/usr/sbin/mysqld(dict_table_open_on_name(char const*, unsigned long, unsigned long, dict_err_ignore_t)+0x4c5) [0x55c9df5d3665]
/usr/sbin/mysqld(dd_upgrade_table(THD*, char const*, char const*, dd::Table*, TABLE*)+0xcb5) [0x55c9df627395]
/usr/sbin/mysqld(+0x22e20b7) [0x55c9df1ab0b7]
/usr/sbin/mysqld(dd::upgrade_57::migrate_all_frm_to_dd(THD*, char const*, bool)+0x70e) [0x55c9df1ac64e]
/usr/sbin/mysqld(dd::upgrade_57::fill_dd_and_finalize(THD*)+0x122) [0x55c9df18ff52]
/usr/sbin/mysqld(+0x11e4b08) [0x55c9de0adb08]
/usr/sbin/mysqld(+0x28af8ca) [0x55c9df7788ca]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x9609) [0x7fee0f23b609]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x43) [0x7fee0e981293]

I am no expert at any of this and especially don't know what the stack trace is telling me, but I tried looking into the "found partially upgraded DD" error, though found nothing that resembled my problem. I tried to install, reinstall (purge, autoremove, autoclean, all those suggestions I saw, basically) but I can't even install mysql-server, it always ends in an error (that the daemon failed to start) I can't start the mysql service either because of the same error. install -f doesn't work either, because again, the error appears. Mysql does have 755 permissions for the /run/mysql folder, I checked. I also tried dpkg --configure -a that also resulted in a similar error. I also looked into the apparmor thing because I saw someone suggest adding mysql in there so it isn't denied, but it was already in there.

At this point, my brain is fried. Does anyone know what could cause this and help me fix it?

  • Did I read this correctly you removed python before the upgrade? – David Apr 22 '21 at 13:11
  • Yes, it said python 2.7 was outdated (I have python 3 as well). – eagle_1 Apr 22 '21 at 13:12
  • Removing python can cause a lot of problems Most of them require a new install from scratch to solve. Ubuntu 18.04 comes with Python 2.7 and Python 3.6 out-of-the-box, and later includes Python 3.7. – David Apr 22 '21 at 13:15
  • So you'd suggest re-installing ubuntu? I removed python 2.7 in a fit of despair because it just wouldn't upgrade my ubuntu. Guess I invited more problems that way – eagle_1 Apr 22 '21 at 13:17
  • In 20.04 LTS, the python included in the base system is Python 3.8. Python 2.7 has been moved to universe and is not included by default in any new installs The upgrade was warning you and should have worked without remvoing python and it would have installed the correct version for 20.04 In 20.04 LTS, the python included in the base system is Python 3.8. Python 2.7 has been moved to universe and is not included by default in any new installs – David Apr 22 '21 at 13:17
  • Changing or deleting the standard python version of Ubuntu is a unrecoverable error. You need to reinstall.

    Boot from a live DVD or USB and reinstall. If your live DVD/USB is the same version as the installed Ubuntu version, you will see a "Reinstall" option. This will reinstall the system in the same setup as the existing installation, without formatting the partitions. That way, your user data and user configuration will be preserved.

    – David Apr 22 '21 at 13:17
  • Only way to be sure its 100 percent fixed. – David Apr 22 '21 at 13:18
  • Thank you, I will try that. Maybe the problem lay somewhere else with the upgrade then and I just didn't dig deep enough – eagle_1 Apr 22 '21 at 13:18
  • Could be I have answered this question a lot in the last week seems to be a rash of people removing python and then saying Ubuntu is broken. Here is one example. https://askubuntu.com/questions/1330935/how-do-you-reinstall-ubuntu-after-deleting-python3-6/1330943#1330943 – David Apr 22 '21 at 13:20
  • @David sorry for taking so long to reply. I have a dual boot system and so the option for reinstalling didn't pop up / I am too paranoid not to pick the "something else" option. That's why I made a backup of my systems first and then reinstalled. Everything installs normally now without errors. Thanks again! – eagle_1 Apr 24 '21 at 10:31

1 Answers1

0

Changing or deleting the standard python version of Ubuntu is a unrecoverable error. You need to reinstall.

Boot from a live DVD or USB and reinstall. If your live DVD/USB is the same version as the installed Ubuntu version, you will see a "Reinstall" option. This will reinstall the system in the same setup as the existing installation, without formatting the partitions. That way, your user data and user configuration will be preserved.

David
  • 2,101
  • 13
  • 16
  • 25