Deleting an obsolete OpenVPMS demo database
Way back in 2010 when we installed OV at work, we also set up an openvpms-demo database so that staff could play around and learn the system without affecting the clinic records. After a couple of months we stopped using it and forgot about it (correction: I forgot about it). Since then we've gone from OV 1.4 > 1.5 > 1.7.1 >1.8 > 1.9.3 and Tomcat has gone from 5 > 6 > 7 without any problems.
Over the weekend I tried to update MySQL from 5.1 to 5.5 in preparation to belatedly upgrade 1.9.3 to 2.0.x using an excellent illustrated tutorial at https://myworldofit.net/?p=9623. Seemingly all went well until I got to mysql_upgrade step when a mass of error messages scrolled off the screen. I couldn't start OV and at 2am today decided to restore a system image to before the upgrade to be ready for work today.
When I examined the logs, there were many many errors regarding openvpms-demo. I searched everywhere for openvpms-demo but could find no trace of it (tomcat has been upgraded multiple times so any links to its use in TCatv5 have long been deleted) until I opened Mysql Administrator and found openvpms-demo sitting quietly under "schema privileges".
Question: can I delete openvpms-demo? Without it affecting my working openVPMS? Do I just do a "Drop openvpms-demo" command"? Any other gotchas I should be looking out for?
Yuri.
PS (who is getting very good at creating and restoring system images!)
Re: Deleting an obsolete OpenVPMS demo database
You can get rid of the demo database executing the following in MySQL Administrator:
If you haven't been deploying a corresponding webapp for it when you've upgraded Tomcat, there's nothing else you need to do.
With respect to upgrading MySQL, you can find the official documentation for MySQL 5.5 at https://dev.mysql.com/doc/index-archive.html
The manual link is https://downloads.mysql.com/docs/refman-5.5-en.a4.pdf
See section 2.11 Upgrading MySQL on page 193 for upgrade instructions.
In general, we recommend trying any upgrades (OpenVPMS or MySQL) on a test box before deploying to production.
Re: Deleting an obsolete OpenVPMS demo database
Thanks, I'll try that on Sunday when we're closed. The new server is at the point where I could restore a backup but I don't want a zombie openvpms-demo to come along for the ride.
>trying any upgrades on a test box before deploying to production.
I'm trying to set up a new server so that old server becomes backup / test box. In the meantime "system image create/restore" (2+2 hours) is a "poor man's sandbox" .
Re: Deleting an obsolete OpenVPMS demo database
There are installation instructions for uprading to a new machine: https://www.openvpms.org/documentation/csh/2.2/topics/installing-openvpm...
Re: Deleting an obsolete OpenVPMS demo database
If I read this correctly, I install v2.2, set up openvpms.properties (but link to "toolbox configure" is broken), create empty database, restore backup and migrate the database. So it doesn't matter that current 1.9.3 database is on Mysql v5.1 and new installation is MySql v5.5? Migration takes care of that? Cool!
Will definitely try this on Sunday.
Re: Deleting an obsolete OpenVPMS demo database
I've corrected the toolbox configure link. Thanks for pointing that out.
You should be able to restore a database backed up using mysqldump on MySQL 5.1 to a MySQL 5.5 server.
Note that most mysqldump examples use the redirect operator e.g.:
mysqldump -u openvpms -p openvpms > dump.sql
If you use PowerShell as your command line tool, you should change this to:
mysqldump -u openvpms -p openvpms --result-file dump.sql
as PowerShell with output redirection creates a file that has UTF-16 encoding which isn't supported by mysql (see https://dev.mysql.com/doc/refman/5.7/en/mysqldump.html for more details).