-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I can't for the life of me get this to work #789
Comments
As the log message indicates, the MySQL driver you are using does not support setting the network timeout. Perhaps a newer version of the driver does. |
Using org.mariadb.jdbc.MySQLDataSource now but It gives me a ClassNotFoundException despite the fact I've got mariadb-java-client as a maven dependency. |
@incrementing The |
@brettwooldridge Thanks for the info... I'll have to update the driver at some point. |
Version: 2.5.1
When using this code:
hikari = new HikariDataSource(); hikari.setMaximumPoolSize(10); hikari.setDriverClassName("com.mysql.jdbc.Driver"); hikari.setJdbcUrl("jdbc:mysql://localhost:3306/db_name"); hikari.setUsername("root"); hikari.setPassword("password");
I get this error:
INFO com.zaxxer.hikari.HikariDataSource - HikariPool-6 - Started.
INFO com.zaxxer.hikari.pool.PoolBase - HikariPool-6 - Driver does not support get/set
network timeout for connections. (com.mysql.jdbc.JDBC4Connection.getNetworkTimeout()I)>
So I then used this code:
hikari = new HikariDataSource(); hikari.setMaximumPoolSize(10); hikari.setDataSourceClassName("com.mysql.jdbc.jdbc2.optional.MysqlDataSource"); hikari.addDataSourceProperty("serverName", "localhost"); hikari.addDataSourceProperty("port", "3306"); hikari.addDataSourceProperty("databaseName", "db_name"); hikari.addDataSourceProperty("user", "root"); hikari.addDataSourceProperty("password", "password");
Which throws the same error.
This code used to work for me but for some reason I can't get it to work anymroe. I'm probably being an idiot but any help would be appreciated.
The text was updated successfully, but these errors were encountered: