I am currently trying to have openemr set up on a ubuntu system, and wonder how I can convert the old patient data from a windows platform server to the new ubuntu system. I have tried to find some clues on the internet but so far no luck. Any help is greatly appreciated!
If you do not have the same versions of OpenEMR on the Windows server and the Ubuntu server you need to upgrade the old server to the same version as on the Ubuntu.
If you don’t you’ll end up with a version mismatch between your MySQL OpenEMR tables and the actual OpenEMR installed on the Ubuntu. This can be fixed but amounts to patching the OpenEMR tables to upgrade the data after being transferred.
Always back up your OpenEMR data before you start making these types of changes.
The database is from OEMR-2.9.0 running on windows server2003, I am trying to get it loaded to OEMR-2.9.0 running on Ubuntu 8.04.
I tried Dr. Bowen’s commands, the computer asks me the password, to which I entered the password for phpmyadmin, did not work. I do not recall setting up another password. Here is the script:
mysqladmin: connect to server at ‘localhost’ failed
error: ‘Access denied for user ‘root’@‘localhost’ (using password: YES)’
I then tried to go to http://localhost/phpmyadmin, log in and then click "openemr" tab under database, then "import", follow the prompt and got the following error msg:
what you need is the password for the root user in mysql. Maybe you are using the wrong password, or you never set it up in the first place. Try hitting enter at the prompt without entering any password. If this works (dont tell us here) you really need to secure your mysql server.
The mysqldump command if you have not set the password is to just leave out the "-p":
C:>mysqldump -u root openemr > openemr_today.sql
And as Dr. Gutierrez suggests, it is very important to secure your mysql installation. By default mysql does not require a root password but it is leaving the barn door open not to set a root password.
What you suggested worked, Thank you all, Drs. Bowen and Gutiersa. It was really helpful–I was up whole day yesterday could not find the way to load the data. Now I am ready to try each individual funcitons on the new server. Thanks again!
I thought everything would be fine from here on, but it is not. It seems working well without any change of the root passwd of mysql (there is no passwd). When I try to put a password (tried with phpmyadmin and putting the passwd in command line both), I was able to log in to mysql at command line and view the tables with the new password: "# mysql -p openemr", then "show tables;", but can not log in to openemr any more. When logging in, it gives me this error msg:
Warning: mysql_pconnect() [function.mysql-pconnect]: Access denied for user ‘root’@‘localhost’ (using password: NO) in /var/www/openemr/library/adodb/drivers/adodb-mysql.inc.php on line 335
Warning: mysql_pconnect() [function.mysql-pconnect]: Access denied for user ‘root’@‘localhost’ (using password: NO) in /var/www/openemr/library/adodb/drivers/adodb-mysql.inc.php on line 335
Warning: Cannot modify header information - headers already sent by (output started at /var/www/openemr/library/adodb/drivers/adodb-mysql.inc.php:335) in /var/www/openemr/library/auth.inc on line 142
It seems oemr did not know there is a password now and still try to access mysql without one. Could not figure out which file to put the passwd or make any other change.
It would be helpful to know where you’re currently stuck.
Did you get the data off the Windows Server?
- Just the physical files
Did you transfer the data to the Linux Server?
- Just the physical copy of the database export files
Have you created the OpenEMR database on the Linux Server?
- This happens when you install OpenEMR
Did you successfully import the exported data into the Linux Server?
On the LINUX server take a look at the file <openemr>/library/sqlconf.inc. In there you should see the database host, port, username, password, and database name. Are they what you expected to see? For an example, on my server, I have
$host = ‘localhost’;
$port = ‘3306’;
$login = ‘XXXXXXXXXXX’;
$pass = ‘XXXXXXXXXXX’;
$dbase = ‘openemr’;