B4J Question [SOLVED] MySQL Connector/J

T201016

Active Member
Licensed User
Longtime User
Using for testing connections using:
- mysql-connector-java-5.1.27-bin.jar

everything works fine when I change
- to: mysql-connector-java-8.0.20.jar

#Used by MYSQL v5.7.28: 3306
DriverClass=com.mysql.jdbc.Driver
JdbcUrl=jdbc:mysql://localhost:3306/example?characterEncoding=utf8
User=root
Password=


What form do you need to modify (JdbcUrl) to
worked on version ?: mysql-connector-java-8.0.20.jar
(using the (user and password) option)

Can you give me a hint?
Thank you.
 

TILogistic

Expert
Licensed User
Longtime User
Upvote 0

OliverA

Expert
Licensed User
Longtime User
What is your error message when you use v8 of the driver?
 
Upvote 0

TILogistic

Expert
Licensed User
Longtime User
see post solution:

"com.mysql.cj.jdbc.Driver"

and

time zone

 
Upvote 0

T201016

Active Member
Licensed User
Longtime User
Hello everyone again!
I used similar connector links ... and none of them worked for me.

My version of SQL is 8.0.18.
I expected the latest version of the JDBC 8.0.20 driver to work.

So, it finally only worked with the settings in the following configuration:
(both from 8.0.20 (adding time zone prop) and 5.1.27 connector

WORKING EXAMPLE:

B4X:
#DATABASE CONFIGURATION
#Port used by APACHE________v2.4.41: 8080
#Port used ny PHP_____________v7.4.00:  --
#Port used by MYSQL__________v5.7.28: 3306    (interchangeably!)
#Port used by MYSQL__________v8.0.18: 3306    (interchangeably!)
#Port used by MariaDB________v10.4.10: 3308  (interchangeably!)

#Change based on the jdbc jar file
#AdditionalJar: mysql-connector-java-5.1.27
#DriverClass=com.mysql.jdbc.Driver
#JdbcUrl=jdbc:mysql://localhost:3306/example?characterEncoding=utf8

#Port used by MYSQL    v8.0.18: 3306
#Change based on the jdbc jar file
#AdditionalJar: mysql-connector-java-8.0.20
#JdbcUrl=jdbc:mysql://{SERVER}:{PORT}/{DATABASE}?characterEncoding=utf8&autoReconnect=true&useTimezone=true&&serverTimezone=UTC&Pooling=True
DriverClass=com.mysql.cj.jdbc.Driver
JdbcUrl=jdbc:mysql://localhost:3306/example?characterEncoding=utf8&autoReconnect=true&useTimezone=true&&serverTimezone=UTC&Pooling=True

User=root
Password=
#Java server port
ServerPort=17178

#If Debug is true then this file will be reloaded on wery query.
#This is useful if you nedd to modify the queries.
Debug=false

#SQL COMMANDS

I think, like others, that SQL sometimes cannot provide clear information ...

Thank you all for your patience awaiting my response and efforts to help me with this !!!
Best regards.
 
Upvote 0
Top