Eighth. Some problems about SQL query error

Source: Internet
Author: User

Problem one: When using MySQL to query and return a result set, it is true that the statement interface and the PreparedStatement object are known to the small partners. The problem comes, sometimes unexpectedly can not query, debug in, found the execution of SQL statement is garbled,

1. OK first solve garbled, find MyEclipse Open File location Add "-dfile.encoding=utf-8" to the "Myeclipse.ini" file. Again debugging, you will find that the problem is not solved, but brings new problems, such as you enter "Xiao Ming", then in the execution of SQL statements in the incoming is "Xi Xiao Ming", so of course, can not find out the results. Thought it was "Java driver package" problem, I Installed "Mysql-connector-java-5.1.44-bin.jar", later ruled out this possibility. Originally is the MySQL database version problem, I originally installed is: Mysql-5.5.54-win32.msi version, later changed the Mysql-5.7.17.0.msi version, this problem is gone. But the drawback is that the new problem comes again: code as follows, more than the red hint below, have the great God know why?

Please login first, please enter the name of the pet owner:
Xiao ming
Please enter the password for your account:
123456
Sat Oct 17:14:00 CST warn:establishing SSL connection without server ' s identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must is established by default if explicit Opti On isn ' t set. For compliance with existing applications not using SSL, the Verifyservercertificate property was set to ' false '. You need either to explicitly disable SSL by setting Usessl=false, or set usessl=true and provide truststore for server CE Rtificate verification.
Landing Success!
Your basic information *************
Name: Xiao Ming
Number of ingot: 178
Login successful, you can buy and sell pets, buy Please enter 1, sell Please enter 2:
1: Buy a pet
2: Selling Pets

Eighth. Some problems about SQL query error

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.