XAMPP shotdown unexpectedly

Situation
Dear Sir/ Madam

I have two times gotten XAMPP shotted down unexpectedly. The first time it worked by deleting two files called aria_log.00000001 & aria_log_control. For the second time when it stopped unexpectedly, I deleted what was in data folder except for ibdata1 and replaced them by the files in mysql/backup. Mysql worked afterwards but openemr did not open as expected. It gives an error which comes here.

Is there any solution for the issue?

OpenEMR Version
I’m using OpenEMR version 7.0.3

Browser:
I’m using: Firefox

Operating System
I’m using: Windows 11, 64

Search
Did you search the forum for similar questions? yes

Logs
Did you check the logs? yes
Was there anything pertinent in them? I don’t know

mysql_error.log (460.0 KB)

Please paste them here (surround with three backticks (```) for readability.
You can also turn on User Debugging under Administration->Globals->Logging User Debugging Options=>All

This isn’t really specific to OpenEMR itself, more of a XAMPP issue.

That being said, the error you’re seeing in the browser is the same thing that will show up when either the database that OpenEMR is expecting to access isn’t there, or you have bad credentials, so the SQL connection fails.

You need to look at your sqlconf.php file, which is most likely located in “C":\xampp\htdocs\openemr\sites\default” according the error output, and see what the name of your database is, (it’s probably just ‘openemr’, but may be something else depending on how the installation was done).

Verify that the database is present, and the verify that the credentials in the sqlconf.php file are valid for the database. However, the first post mentions having deleted some files, and then restoring others, so going by the content of the error log that was posted, it’s highly likely that your OpenEMR database is either gone, or severely corrupted. Hopefully there was a backup mechanism in place for your MySQL/MariaDB instance, SQL daemons do not respond very well to haphazard deletion/recreation of files in the table storage directories.

Dear CG Penguin8R
Thank you so much for your complete reply. As I do not know the basics of php, I should ask a professional to do that.
Kind regards
Mehrshad