I am in the process of writing a small program to illustrate a problem I'm trying to narrow down. I have a java application which uses a mySQL 8 database and mySQL JDBC driver for Java. When I read a date time field from my database using my App which is running on Windows or MacOS it comes back with a time component which is correct. When I run the same app on Linux the time component is wrong. There are a few variables to narrow down on.
On Mac and Windows I'm using Oracle Java 1.8 202 and on Ubuntu Linux I'm using OpenJDK 1.8 202
I was about to follow the route of checking if the problem went away if I run the Linux version under Oracle Java - but I have also noted that when I download the mySQL JDBC driver from their website they offer versions for
So - can someone explain why the jdbc has to have a Linux distribution specific file - at the moment I'm using the Platform independent version and I will try the Ubuntu version as well.
When running the java code under MacOS I get the time component "08:00"
When running the java code under Ubuntu 18 I get the time component "00:00"
MacOs is running Oracle Java and Linux OpenJDK but I've not determined if it's the Java Version or OS yet - the database is common between both.
MySQL 8.0 Reference Manual wrote:In MySQL, databases correspond to directories within the data directory. Each table within a database corresponds to at least one file within the database directory (and possibly more, depending on the storage engine). Triggers also correspond to files. Consequently, the case sensitivity of the underlying operating system plays a part in the case sensitivity of database, table, and trigger names. This means such names are not case-sensitive in Windows, but are case-sensitive in most varieties of Unix. One notable exception is macOS, which is Unix-based but uses a default file system type (HFS+) that is not case-sensitive. However, macOS also supports UFS volumes, which are case-sensitive just as on any Unix.