MySQL won't start after a restore from a backup

Problems with the Windows version of XAMPP, questions, comments, and anything related.

MySQL won't start after a restore from a backup

Postby Dagem2 » 11. March 2020 06:55

I am a general practitioner From Ethiopia. I’ve deployed XAMPP/OpenEMR package 5.0.0-4 on Windows 7 for my clinic. Lately, I’ve encounter an issue I wasn’t able to fix.
As this is our first time using it, we were manually documenting patient’s data in parallel with OpenEMR.
After restoring a backup of a XAAMP folder containing our OpenEMR installation from an external drive, the MySQL server was unable to start from the XAAMP Control Panel. It gets stuck on “Attempting to start MySQL service...”
Here is a snip of the MySQL error log:

2020-02-26 15:06:46 9c8 InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator.
2020-02-26 15:06:46 2504 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2020-02-26 15:06:46 2504 [Note] InnoDB: The InnoDB memory heap is disabled
2020-02-26 15:06:46 2504 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2020-02-26 15:06:46 2504 [Note] InnoDB: Memory barrier is not used
2020-02-26 15:06:46 2504 [Note] InnoDB: Compressed tables use zlib 1.2.3
2020-02-26 15:06:46 2504 [Note] InnoDB: Using generic crc32 instructions
2020-02-26 15:06:46 2504 [Note] InnoDB: Initializing buffer pool, size = 256.0M
2020-02-26 15:06:46 2504 [Note] InnoDB: Completed initialization of buffer pool
2020-02-26 15:06:46 2504 [Note] InnoDB: Highest supported file format is Barracuda.
2020-02-26 15:06:47 2504 [Note] InnoDB: 128 rollback segment(s) are active.
2020-02-26 15:06:47 2504 [Note] InnoDB: Waiting for purge to start
2020-02-26 15:06:47 2504 [Note] InnoDB: Percona XtraDB ( 5.6.28-76.1 started; log sequence number 269624136
2020-02-26 15:06:47 5368 [Note] InnoDB: Dumping buffer pool(s) not yet started
2020-02-26 15:06:47 2504 [Note] Plugin 'FEEDBACK' is disabled.
2020-02-26 15:06:47 2504 [Note] Server socket created on IP: '::'.
2020-02-26 15:06:47 2504 [Note] C:\xampp\mysql\bin\mysqld.exe: ready for connections.
Version: '10.1.13-MariaDB' socket: '' port: 3306 binary distribution
2020-02-27 11:12:48 1876 [Note] C:\xampp\mysql\bin\mysqld.exe: Normal shutdown

After consulting various forums and guides, I took these approaches:
I. Hitting on the start button a dozen times continuously
Surprisingly, MySQL started running. And I was able to login to OpenEMR without any loss of data. But this step should be repeated each time after the machine reboots.

II. Deleting ib_logfile0, ib_logfile1 and ibdata1 files
This enables the MySQL server to start running instantly. However, data is lost and OpenEMR is inaccessible. The files are also re-written again after restart because InnoDB is enabled. The following displays when connecting to localhost\openemr.

III. Recovering from corrupted InnoDB tables
I first tried bringing up our database in recovery mode. Then, I changed the port used by MySQL server to another random port (8881) and added “innodb_force_recovery=3” to my.ini in the [mysqld] section.
At this point MySQL’s error log displayed the following
Then MySQL started running (presumably in Recovery Mode) but “Check that mysqld is running.” Message is displayed on localhost\openemr.
Then, I tried to identify which tables were corrupted by executing the mysqlcheck --all-databases command. It didn’t return anything.
But when executing the mysqlcheck -c -u root -p --all-databases command it displayed all tables located in the OpenEMR, MySQL and PhPmyAdmin and all of their statuses were “OK”.
The next step would have been to backup and drop the corrupted tables. In our case, I couldn’t see any table with a status set to “Corrupted”. But I tried backing up a random table from the MySQL DB using the mysqldump mysql time_zone > out.sql command after logging in as “root” to the MySQL DB. And a file “out.sql” was created in the XAAMP folder.
The final steps would have been to drop the corrupted tables from the database and restore them with a dump file; which I didn’t proceed because no corrupted tables were found.
Please note that OpenEMR is still inaccessible; http://localhost/openemr is still displaying “Check that mysqld is running.” while MySQL is running.

These are the approaches I’ve taken so far. I don’t have a background in IT. I just tried all possible fixes and I’m not even sure if they’re applicable to this issue.
If anyone experienced a similar issue in the past, kindly share a possible solution and maybe informs us on what may have caused it to occur.
We would like to be able to confidently test run OpenEMR for a period of time before moving our operations on it.

Thank you
Posts: 1
Joined: 10. March 2020 14:45
XAMPP version: 5.6.20
Operating System: Windows 7

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 46 guests