[GeoNetwork-users] GeoNetwork & MySQL

I'm attempting to switch from H2 to MySQL in our development environment
(RHEL 6, GeoNetwork 3.0.4.0, MySQL 5.6.25 InnoDB) and have run into some
issues.

What I've done is edit these two files:

(1) .../tomcat/webapps/geonetwork/WEB-INF/config-node/srv.xml
* Commented out the reference to H2, uncommented the reference to mysql.

(2) .../tomcat/webapps/geonetwork/WEB-INF/config-db/jdbc.properties
* Filled in the data for the MySQL host, db name, username, password.

When I restart Tomcat I got a screen dump of errors, one being an SQL
for {dbname}.settings not being found. I used a MySQL command-line
client to access the geonet DB, and do see that a schema was created.

I renamed 'Settings' to lower-case 'settings', manually via a MySQL
client, and that error went away -- but I suspect there may be others,
since the other table names have caps in them.

More research https://zihengsun.wordpress.com/) suggests that you need
to edit my.cnf and make table names case-insensitive on a Linux
environment. Unfortunately, we are hosting this on an enterprise MySQL
service and are probably unable to have that change made.

Is there something else I've missed, or some other way approach using MySQL?

Regards,

--
Paul F. Bramscher
brams006@anonymised.com
612-626-2098
University of Minnesota Libraries
PGP Public Key: http://z.umn.edu/brams006pubkey

In addition to our potential switch from H2 to MySQL, another
database-related issue we've encountered is what appears to be locking
issues with H2 when we restart Tomcat -- and we find a fresh/empty H2
database, and need to restore records to it from backups.

This leads to a question I have about a setting here:
../webapps/geonetwork/WEB-INF/config-node/srv.xml

Namely, its call here:
../webapps/geonetwork/WEB-INF/config-db/database_migration.xml

With subsequent restarts of Tomcat+geonetwork, does this basically cause
a fresh DB schema to be created? i.e. Should we comment this out in
srv.xml, once we've installed the application and the initial schema is
created?

Regards,

--
Paul F. Bramscher
brams006@anonymised.com
612-626-2098
University of Minnesota Libraries
PGP Public Key: http://z.umn.edu/brams006pubkey

On 06/01/2016 03:13 PM, Paul Bramscher wrote:

I'm attempting to switch from H2 to MySQL in our development environment
(RHEL 6, GeoNetwork 3.0.4.0, MySQL 5.6.25 InnoDB) and have run into some
issues.

What I've done is edit these two files:

(1) .../tomcat/webapps/geonetwork/WEB-INF/config-node/srv.xml
* Commented out the reference to H2, uncommented the reference to mysql.

(2) .../tomcat/webapps/geonetwork/WEB-INF/config-db/jdbc.properties
* Filled in the data for the MySQL host, db name, username, password.

When I restart Tomcat I got a screen dump of errors, one being an SQL
for {dbname}.settings not being found. I used a MySQL command-line
client to access the geonet DB, and do see that a schema was created.

I renamed 'Settings' to lower-case 'settings', manually via a MySQL
client, and that error went away -- but I suspect there may be others,
since the other table names have caps in them.

More research https://zihengsun.wordpress.com/) suggests that you need
to edit my.cnf and make table names case-insensitive on a Linux
environment. Unfortunately, we are hosting this on an enterprise MySQL
service and are probably unable to have that change made.

Is there something else I've missed, or some other way approach using MySQL?

Regards,

Hi

2016-06-03 16:51 GMT+02:00 Paul Bramscher <brams006@anonymised.com>:

In addition to our potential switch from H2 to MySQL, another
database-related issue we've encountered is what appears to be locking
issues with H2 when we restart Tomcat

I also noticed some issue with the formatter cache database when restarting
using Tomcat manager.
Using the dev mode with inMemoryCache was workaround the issue.
https://github.com/eea/geonetwork-eea/commit/c270322d36bb465aa16c0211d9efefbcd184d461
Would be better to properly configure h2 db.

-- and we find a fresh/empty H2
database, and need to restore records to it from backups.

This leads to a question I have about a setting here:
../webapps/geonetwork/WEB-INF/config-node/srv.xml

Namely, its call here:
../webapps/geonetwork/WEB-INF/config-db/database_migration.xml

With subsequent restarts of Tomcat+geonetwork, does this basically cause
a fresh DB schema to be created? i.e. Should we comment this out in
srv.xml, once we've installed the application and the initial schema is
created?

database_migration.xml is only applied when the webapp and database version
does not match.

HTH

Francois

Regards,

--
Paul F. Bramscher
brams006@anonymised.com
612-626-2098
University of Minnesota Libraries
PGP Public Key: http://z.umn.edu/brams006pubkey

On 06/01/2016 03:13 PM, Paul Bramscher wrote:
> I'm attempting to switch from H2 to MySQL in our development environment
> (RHEL 6, GeoNetwork 3.0.4.0, MySQL 5.6.25 InnoDB) and have run into some
> issues.
>
> What I've done is edit these two files:
>
> (1) .../tomcat/webapps/geonetwork/WEB-INF/config-node/srv.xml
> * Commented out the reference to H2, uncommented the reference to mysql.
>
> (2) .../tomcat/webapps/geonetwork/WEB-INF/config-db/jdbc.properties
> * Filled in the data for the MySQL host, db name, username, password.
>
> When I restart Tomcat I got a screen dump of errors, one being an SQL
> for {dbname}.settings not being found. I used a MySQL command-line
> client to access the geonet DB, and do see that a schema was created.
>
> I renamed 'Settings' to lower-case 'settings', manually via a MySQL
> client, and that error went away -- but I suspect there may be others,
> since the other table names have caps in them.
>
> More research https://zihengsun.wordpress.com/) suggests that you need
> to edit my.cnf and make table names case-insensitive on a Linux
> environment. Unfortunately, we are hosting this on an enterprise MySQL
> service and are probably unable to have that change made.
>
> Is there something else I've missed, or some other way approach using
MySQL?
>
> Regards,
>

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and
traffic
patterns at an interface-level. Reveals which users, apps, and protocols
are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at
http://sourceforge.net/projects/geonetwork