[GeoNetwork-users] The question about Database configuration

Hi,group

I'm trying to configuration geonetwork in mysql database, I change the config.xml according to the manual
when I start the server, it has error about the "com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Specified key was too long; max key length is 767 bytes",it seems that the index length has too long, so what can I do to solve this problem?

please help me!

thanks for any help.

Tina

lity90 wrote

I'm trying to configuration geonetwork in mysql database, I change the
config.xml according to the manual
when I start the server, it has error about the
"com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Specified key
was too long; max key length is 767 bytes",it seems that the index length
has too long, so what can I do to solve this problem?

The username column in the Users table is too long.
In web/geonetwork/WEB-INF/classes/setup/sql/create/create-db-mysql.sql
change the username column to varchar(20) instead of varchar(255). Then it
should work just fine.

Remember to drop the existing the tables before you start GeoNetwork again.

--
Henning

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/The-question-about-Database-configuration-tp5043210p5051103.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.

Hi, MySQL creation script was modified from 256 to 255 character 8
days ago in order to fix that error:
https://github.com/geonetwork/core-geonetwork/commit/699113df6002f70eeb3dc7bad114416568cb5a01

Do you mean 255 is still causing the error ? and we need to limit the
size to less than that ?

Thanks.

Francois

2013/5/3 henningjensen <henning.jensen@anonymised.com>:

lity90 wrote

I'm trying to configuration geonetwork in mysql database, I change the
config.xml according to the manual
when I start the server, it has error about the
"com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Specified key
was too long; max key length is 767 bytes",it seems that the index length
has too long, so what can I do to solve this problem?

The username column in the Users table is too long.
In web/geonetwork/WEB-INF/classes/setup/sql/create/create-db-mysql.sql
change the username column to varchar(20) instead of varchar(255). Then it
should work just fine.

Remember to drop the existing the tables before you start GeoNetwork again.

--
Henning

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/The-question-about-Database-configuration-tp5043210p5051103.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
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

Hi!
I don't remember exactly if the script stated varchar(255) or varchar(256).

My installation package has version number 2.8.0-0 and I downloaded it the
11. April.
I guess this problem is fixed now. :slight_smile:

--
Henning