Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Unable to connect to MySQL database from Stash

Deleted user February 18, 2014

Hi,

I am getting below error when I am trying to connect to MySQL database server from stash. Stash and db servers both are on same Linux machine.

Stash version : v2.10.1
mySQL database version : 5.5.36
JDBC Connector version : mysql-connector-java-5.1.22-bin.jar

below is error message.

The configuration entered is not valid. A database connection could not be established. Please check your configuration and try again.
com.atlassian.stash.internal.db.DefaultDatabaseManager.validateConfiguration(DefaultDatabaseManager.java:188)
com.atlassian.stash.internal.migration.DefaultMigrationService.validateConfiguration(DefaultMigrationService.java:87)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
...
Could not get JDBC Connection; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:80)
com.atlassian.stash.internal.db.DefaultDatabaseValidator.validate(DefaultDatabaseValidator.java:35)
com.atlassian.stash.internal.db.DefaultDatabaseManager.validateConfiguration(DefaultDatabaseManager.java:185)
...
Could not create connection to database server. Attempted reconnect 3 times. Giving up.
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
...
null, message from server: "Host 'XXX.xx.xx.xxx' is not allowed to connect to this MySQL server"
com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1074)
com.mysql.jdbc.SQLError.createSQLException(SQLError.java:988)
com.mysql.jdbc.SQLError.createSQLException(SQLError.java:974)

Appreciate your help.

Thanks , Venkat.

2 answers

1 accepted

0 votes
Answer accepted
Larry Shatzer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 18, 2014

You need to give the user connecting to MySQL access to connect from that host.

See this stackoverflow article on how.

0 votes
Deleted user February 18, 2014

Thank you so much. It worked.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events