Eclipse 使用JDBC访问mysql数据库进行查询操作,出现中文乱码

标签:
中文乱码字符集mysqljdbceclipse |
分类: 数据库 |
What character set is the statement in when it leaves the client?
The server takes the character_set_client system variable to be the character set in which statementsare sent by the client.
What character set should the server translate a statement to after receiving it?
For this, the server uses the character_set_connection and collation_connection system variables. It converts statements sent by the client from character_set_client to character_set_connection (except for string literals that have an introducer such as _latin1 or _utf8). collation_connection is important for comparisons of literal strings. For comparisons of strings with column values, collation_connection does not matter because columns have their own collation, which has a higher collation precedence.
What character set should the server translate to before shipping result sets or error messages back to the client? The character_set_results system variable indicates the character set in which the server returns query results to the client. This includes result data such as column values, and result metadata such as column names and error messages.
2:为什么会出现乱码?
3:如何操作?(仅根据我自身的问题进行阐述)