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 XAMPP folder containing our OpenEMR installationfrom an external drive, the MySQL server was unable to start from the XAMPP Control Panel. It gets stuck on “Attempting to start MySQL service…”
Here is a screenshot of the MySQL error log
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.
I haven’t installed 5-0-0-Patch-8.zip in my OpenEMR 5.0.0 XAMPP Package Installation and power outages occur from time to time. I’ve used this method [ Windows Backup And Restore Made Easy ]to backup and restore the XAMPP folder.
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.