mysql crashes after purge and reinstall with error: "Database files are locked. Daemon already running?"

Bug #1960971 reported by Muneeb Ur Rehman
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
mysql-8.0 (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

during installing mysql

ProblemType: Package
DistroRelease: Ubuntu 20.04
Package: mysql-server-8.0 8.0.28-0ubuntu0.20.04.3
ProcVersionSignature: Ubuntu 5.13.0-28.31~20.04.1-generic 5.13.19
Uname: Linux 5.13.0-28-generic x86_64
ApportVersion: 2.20.11-0ubuntu27.21
Architecture: amd64
CasperMD5CheckResult: skip
Date: Wed Feb 16 04:34:36 2022
ErrorMessage: installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
InstallationDate: Installed on 2022-02-15 (0 days ago)
InstallationMedia: Ubuntu 20.04.3 LTS "Focal Fossa" - Release amd64 (20210819)
Logs.var.log.daemon.log:

MySQLConf.etc.mysql.conf.d.mysql.cnf: [mysql]
MySQLConf.etc.mysql.conf.d.mysqldump.cnf:
 [mysqldump]
 quick
 quote-names
 max_allowed_packet = 16M
MySQLConf.etc.mysql.my.cnf: Error: [Errno 40] Too many levels of symbolic links: '/etc/mysql/my.cnf'
MySQLVarLibDirListing: ['mysql', 'client-cert.pem', 'binlog.000001', 'debian-5.7.flag', 'ca.pem', 'public_key.pem', 'ib_logfile0', 'private_key.pem', 'ca-key.pem', 'undo_001', 'ib_logfile1', 'sys', 'mysql.ibd', 'client-key.pem', 'ibtmp1', 'ib_buffer_pool', 'binlog.000007', 'binlog.000003', 'server-cert.pem', 'laptopmuneeb.pid', 'ibdata1', 'undo_002', 'binlog.000002', 'server-key.pem', 'auto.cnf', 'binlog.index', '#innodb_temp', 'binlog.000006', 'performance_schema', 'binlog.000004', '#ib_16384_1.dblwr', '#ib_16384_0.dblwr', 'binlog.000005']
ProcCmdline: BOOT_IMAGE=/boot/vmlinuz-5.13.0-28-generic root=UUID=b5865555-ad67-423d-9e55-225fa0246a65 ro quiet splash vt.handoff=7
Python3Details: /usr/bin/python3.8, Python 3.8.10, python3-minimal, 3.8.2-0ubuntu2
PythonDetails: N/A
RelatedPackageVersions:
 dpkg 1.19.7ubuntu3
 apt 2.0.6
SourcePackage: mysql-8.0
Title: package mysql-server-8.0 8.0.28-0ubuntu0.20.04.3 failed to install/upgrade: installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Muneeb Ur Rehman (muneebkh2) wrote :
Revision history for this message
Lena Voytek (lvoytek) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better.

Looking into the error: "ERROR: Database files are locked. Daemon already running?" and the statement in mysql's error.log "[InnoDB] Unable to lock ./ibdata1 error: 11" it seems like another instance of mysql was locking the files. Do you know if any separate instances of mysql were running at that time?

Alternatively, this may have been caused by uninstalling and reinstalling mysql. In the dpkg history it shows the following commands:

apt-get install -y mysql-server
apt upgrade
apt-get remove --purge mysql* -y
apt-get autoremove -y
apt-get install -y mysql-server

The previous install may have blocked the second one from completing. Was there a specific reason for uninstalling and reinstalling? Did any errors show up during the first install?

Thanks

Changed in mysql-8.0 (Ubuntu):
status: New → Incomplete
Lena Voytek (lvoytek)
summary: - package mysql-server-8.0 8.0.28-0ubuntu0.20.04.3 failed to
- install/upgrade: installed mysql-server-8.0 package post-installation
- script subprocess returned error exit status 1
+ mysql crashes after purge and reinstall with error: "Database files are
+ locked. Daemon already running?"
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for mysql-8.0 (Ubuntu) because there has been no activity for 60 days.]

Changed in mysql-8.0 (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.