Cannot restore database to a Windows 10 system

Situation
I have an Open Emr database, emr_backup.tar from a Linux system. I am trying to restore this database to a Windows 10 based system. I have Open EMR 5.0.1 successfully running on this Windows system. I found two ways to try to restore this database and can get neither of them to successfully work.

  1. https://www.open-emr.org/wiki/index.php/Windows_OpenEMR_Restore_using_emr_backup.tar

I was able to import the database (never asked for a password) using these instructions, but it seems to corrupt the entire software. I cannot even start the login page of Open EMR.

  1. https://www.open-emr.org/wiki/index.php/Backing_Up_Using_the_Built_In_Tools

I was able to find the “restore” file but when I click on it, nothing happens. Are these instructions not for a Windows based system?

OpenEMR Version
I’m using OpenEMR version 5.0.1

Browser:
I’m using:

Google Chrome
Operating System
I’m using: Windows 10

Logs
Did you check the logs? Was there anything pertinent in them? Paste them here (surround with three backticks (```) for readability

Hi @trtrlik,

That might be the issue the size tar or there might be some other issue please give me your tv access I will check that.

Thanks,
Nilesh

Thank you, Nilesh. Sorry, but what do you mean by tv access?

Hi @trtrlik

Please try the below steps to restore the database.

In Windows, the database file can be restored with phpmyadmin.

Create a username and password with phpmyadmin and give the permissions to the openemr database restored.

The username and password must be the same as specified in openemr\sites\default\sqlconf.php.

Hope this may help you.

Regards,
ViSolve-121

Thanks, ViSolve-121. So when I create a username and password with phpmyadmin, should I check “create database with same name and grant all privileges”? If I do so, then I can’t see that new database in the list of databases. But if I don’t check it, it creates a new account but I can’t see how I can connect it to the current openemr database.

Hi @trtrlik

Have you tried this.

In phpmyadmin, go to privileges, click ‘add a new user’.
Provide the login information area(username, password).
Click on the radio button for create database with the same name(restored database name) and grant all privileges.

There you can find import option and using that, you can import your sql file.
After successful import, you can check whether all the tables have been restored.
Make sure that your username and password match the same as in sql.conf file.

Hope this helps you.

Regards,
ViSolve-121

Hi @ViSolve-121

Thanks again so much for the advice. So I tried all of the steps that you suggested. It seemed to import the sql file but after about 10 minutes, it gave an error message-

phpMyAdmin- ERROR
Incorrect format parameter

Does this mean that I did not put in the correct login/password for the database? Or does it mean that I did not create the database with the same name? Is the name of the database the same as the name of the backup file- openemr.tar.gz? I just used ‘openemr’ as the database name. When I tried to start OpenEMR, it says- Check that mysqld is running, and it is running fine.

Thanks much.

Hello,
I don’t mean to hijack the thread. I just have a similar question.

I have linux mint and want to back up to another linux mint computer.

https://www.open-emr.org/wiki/index.php/Backing_Up_Using_the_Built_In_Tools

I was able to get to the restore but when it asked for OpenEMR database password

Do I use the password from the new computer (fresh install) or password from the backup.tar? I tried both and it worked for both. I just don’t want any future errors.