CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2019
    Posts
    2

    I'm getting a Fatal SQL Error which is probably easy to correct but I'm stuck

    Hello all.

    I'm trying to connect to my MySQL database but im getting this fatal error:

    Code:
    Fatal SQL Error: The server time zone value 'GMT Summer Time' 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.
    Any thoughts on how to fix this as its stopping me from running SQL queries. Help appreciated!

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: I'm getting a Fatal SQL Error which is probably easy to correct but I'm stuck

    Find out where this value is being set (i.e. from your code or from the NoSQL setup) and change it to a valid value. If you are running on Windows, you can try "Pacific Standard Time" which I know is a valid value (then you can change it to your time zone later).

  3. #3
    Join Date
    Apr 2019
    Posts
    2

    Re: I'm getting a Fatal SQL Error which is probably easy to correct but I'm stuck

    Quote Originally Posted by Arjay View Post
    Find out where this value is being set (i.e. from your code or from the NoSQL setup) and change it to a valid value. If you are running on Windows, you can try "Pacific Standard Time" which I know is a valid value (then you can change it to your time zone later).
    Thanks for the reply. I done some further research about what u said and I changed my code to this:

    Code:
    jdbc:mysql://"+hostname+":3306/"+database+"?serverTimezone=UTC
    And it worked!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured