mysql-server doesn't start on Ubuntu 22.04 LXC Container

kamzata

Renowned Member
Jan 21, 2011
219
9
83
Italy
Just downloaded the Ubuntu 22.04 LXC template from Proxmox GUI and installed the mysql-server but it doesn't start. This is the message while installing it:

Bash:
...
Setting up mysql-server-8.0 (8.0.29-0ubuntu0.22.04.2) ...
Renaming removed key_buffer and myisam-recover options (if present)
Warning: Unable to start the server.
Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xeu mysql.service" for details.
invoke-rc.d: initscript mysql, action "start" failed.
● mysql.service - MySQL Community Server
     Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
     Active: activating (auto-restart) (Result: exit-code) since Sat 2022-05-14 13:58:15 CEST; 3ms ago
    Process: 5647 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
    Process: 5655 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)
   Main PID: 5655 (code=exited, status=1/FAILURE)
     Status: "Server startup in progress"
      Error: 22 (Invalid argument)
        CPU: 280ms

May 14 13:58:15 stats systemd[1]: Failed to start MySQL Community Server.
dpkg: error processing package mysql-server-8.0 (--configure):
 installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-8.0; however:
  Package mysql-server-8.0 is not configured yet.

dpkg: error processing package mysql-server (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 mysql-server-8.0
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

This is the status output:

Bash:
 ⌁ root  ~  service mysql status
× mysql.service - MySQL Community Server
     Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Sat 2022-05-14 13:58:19 CEST; 3min 31s ago
    Process: 5794 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
    Process: 5802 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)
   Main PID: 5802 (code=exited, status=1/FAILURE)
     Status: "Server startup in progress"
      Error: 22 (Invalid argument)
        CPU: 277ms

May 14 13:58:19 stats systemd[1]: Failed to start MySQL Community Server.
May 14 13:58:19 stats systemd[1]: mysql.service: Scheduled restart job, restart counter is at 5.
May 14 13:58:19 stats systemd[1]: Stopped MySQL Community Server.
May 14 13:58:19 stats systemd[1]: mysql.service: Start request repeated too quickly.
May 14 13:58:19 stats systemd[1]: mysql.service: Failed with result 'exit-code'.
May 14 13:58:19 stats systemd[1]: Failed to start MySQL Community Server.

and this is the /var/log/mysql/error.log file:

Code:
2022-05-14T01:14:09.861441Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.29-0ubuntu0.22.04.2) initializing of server in progress as process 794
2022-05-14T01:14:09.867136Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-05-14T01:14:10.094521Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2022-05-14T01:14:11.220254Z 6 [Warning] [MY-010453] [Server] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
2022-05-14T01:14:12.079700Z 6 [System] [MY-013172] [Server] Received SHUTDOWN from user boot. Shutting down mysqld (Version: 8.0.29-0ubuntu0.22.04.2).
2022-05-14T01:14:15.266629Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.29-0ubuntu0.22.04.2) starting as process 844
2022-05-14T01:14:15.278804Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-05-14T01:14:15.298511Z 1 [ERROR] [MY-012963] [InnoDB] Log file ./ib_logfile1 is of different size 0 bytes than other log files 18874368 bytes!
2022-05-14T01:14:15.298551Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error.
2022-05-14T01:14:15.789792Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine
2022-05-14T01:14:15.789963Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2022-05-14T01:14:15.790050Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-05-14T01:14:15.790748Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.29-0ubuntu0.22.04.2)  (Ubuntu).

Any solutions?
 
Thanks. So, when will it be available in the subscription repository?
We cannot give an exact date when a particular package version will be ready for the enterprise repository - as we cannot guarantee that nothing will come up during testing.

That being said - the patch has not been applied yet - so it will be one or two weeks at least

I'll try to update this thread once the package with the fix is available in our public testing repository
 
  • Like
Reactions: kamzata
We cannot give an exact date when a particular package version will be ready for the enterprise repository - as we cannot guarantee that nothing will come up during testing.

That being said - the patch has not been applied yet - so it will be one or two weeks at least

I'll try to update this thread once the package with the fix is available in our public testing repository
Just noticed there's new pve-kernel-5.15.35-1-pve update now. Is anything related to this issue? In the change log I read something about ZFS...
 
Just noticed there's new pve-kernel-5.15.35-1-pve update now. Is anything related to this issue? In the change log
no - the upload was version 5.15.35-3 of pve-kernel-5.15.35-1-pve - the changelog (which you can get with `apt changelog pve-kernel-5.15.35-1-pve`), contains the changes - in that case fixes for aquantia nics.
The ZFS change is not yet in this version
 
Thanks but nothing's changed.
did you try to run the truncate command inside the container - and restart mysql server afterwards?

EDIT: run the command after the first failed install of the mysql/mariadb server install.... - then restart the service
 
Last edited:
did you try to run the truncate command inside the container - and restart mysql server afterwards?

EDIT: run the command after the first failed install of the mysql/mariadb server install.... - then restart the service
You're right. It starts but every time I restart it fails and I cannot upgrade.
 
Last edited:
  • Like
Reactions: Herkz and kamzata

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!