Questions about using MyEclipse to connect to MySQL

Source: Internet
Author: User

Configuring the Hibernate.cfg.xml test to connect to the MySQL database is always an error, such as:

Think of this configuration is not wrong ah, but has been testing the connection is not. After checking it out, you need to add the SERVERTIMEZONE=UTC to the connection string, where UTC is the uniform standard world time.

Example of a complete connection string: JDBC:MYSQL://LOCALHOST:3306/STUDENT?SERVERTIMEZONE=UTC

Plus a post-test connection, then you can connect.

PS: Or there is another option: Jdbc:mysql://localhost:3306/student?useunicode=true&characterencoding=utf-8, this is to solve the Chinese garbled input problem, Of course, it can be combined with the above: Jdbc:mysql://localhost:3306/student? Useunicode=true&characterencoding=utf-8&servertimezone=utc

Questions about using MyEclipse to connect to MySQL

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.