Getting 'Duplicate entry' when Using MySQL on OS X

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

  1. Using MySQL 5.5.9 or higher
  2. Using OS X

The following appears in the atlassian-confluence.log:


2011-04-04 21:38:31,742 ERROR [http-8081-4] [atlassian.confluence.servlet.ConfluenceServletDispatcher] sendError Could not execute action
 -- referer: http://localhost:8081/spaces/createspace-start.action | url: /spaces/createspace.action | userName: admin
org.springframework.dao.DataIntegrityViolationException: Hibernate operation: could not insert: [com.atlassian.confluence.spaces.Space#458753]; SQL []; Duplicate entry '458753' for key 'PRIMARY'; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '458753' for key 'PRIMARY'
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '458753' for key 'PRIMARY'

Cause

This is a bug in MySQL being tracked here.

Workaround

Change the lower_case_table_name to 1 in MySQL configuration file (eg. /etc/my.cnf):


lower_case_table_name=1

Resolution

Downgrade MySQL to the supported version.


Last modified on Mar 30, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.