Installation Fails Due to Lack of Database Permission

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

When trying to install Crowd, the following error appears in the Setup Wizard:

could not get or update next value; SQL [null]; nested exception is org.hibernate.exception.SQLGrammarException: could not get or update next value.

Also, the following appears in the atlassian-crowd.log:

Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: UPDATE command denied to user 'crowd'@'localhost' for table 'hibernate_unique_key'

Or

015-09-03 17:34:38,633 http-bio-80-exec-23 ERROR [atlassian.config.bootstrap.DefaultAtlassianBootstrapManager] Could not successfully test your database: 
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
.....
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.sql.SQLException: Access denied for user 'grdb_owner'@'localhost' (using password: YES)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1078)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4187)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4119)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:927)
	at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1709)
	at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1252)
	at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2483)
	at com.mysql.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:2324)

 

Cause

The MySQL user, that is set up to connect to Crowd, does not have the UPDATE permission to perform such task. 

Resolution

Grant the appropriate permissions to the database user, by executing the following query:

GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,INDEX on <CROWD_DB>.* TO '<USERNAME>'@'<CROWD_SERVER_HOSTNAME>' IDENTIFIED BY '<PASSWORD>';
flush privileges;

After that, restart Crowd and the installation shall continue.

Last modified on Mar 30, 2016

Was this helpful?

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