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.
You need to give the user connecting to MySQL access to connect from that host.
See this stackoverflow article on how.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.