I want to make a small employee management system software using database(XAMP SOFTWRE). SOftare I am using NETBEANS
FOR DATA BASE CONNECTION I AM USING : 1.JAR = mysql-connector-java-8.0.19 2. BIN = mysql-connector-java-5.1.41.
When I want to put my information I am getting problem. Can anyone help me to solve this problem?
Code :
try {
Class.forName("com.mysql.jdbc.Driver");
con1 = DriverManager.getConnection("jdbc:mysql://localhost/project1","root","");
insert = con1.prepareStatement("insert into records(idno,name,occu,dob,pn)values(?,?,?,?,?)");
insert.setString(1,idno);
insert.setString(2,name);
insert.setString(3,occu);
insert.setString(4,dob);
insert.setString(5,pn);
insert.executeUpdate();
JOptionPane.showMessageDialog(this,"Information has been successfully recorded.");
enter code here
OUTPUT RESULT :
Loading class com.mysql.jdbc.Driver'. This is deprecated. The new driver class is
com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
Apr 12, 2020 11:42:04 PM project1.reg jButton1ActionPerformed
SEVERE: null
java.sql.SQLException: The server time zone value 'unknown' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the 'serverTimezone' configuration property) to use a more specifc time zone value if you want to utilize time zone support.
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:89)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:63)