brkesah :
I am connecting to a MySQL database but I got an error about timezone. So I solved it by adding useLegacyDatetimeCode=false&serverTimezone=UTC
:
String url = "jdbc:mysql://" + host + ":" + port + "/" + db_isim +
"?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC";
Now I need to add this too: ?useUnicode=true&characterEncoding=utf8
Is there a way for this? (Not very good at English so basic explanation or just the code will be good)
I need to add this code for Turkish characters. I tried adding next to it but the connection went lost.
Eritrean :
Have you tried :
String url = "jdbc:mysql://" + host + ":" + port + "/" + db_isim
+ "?useUnicode=true&"
+ "useJDBCCompliantTimezoneShift=true&"
+ "useLegacyDatetimeCode=false&"
+ "serverTimezone=UTC&"
+ "characterEncoding=utf8";