===============================================
20170607_ for the first time modified ccb_warlock
===============================================
Working relationships develop a C # program that connects to MySQL, delivering tests that respond to errors after a database is connected to a test environment and where data is not available. (as shown)
After I found http://www.cnblogs.com/xiaochaohuashengmi/archive/2010/07/23/1783589.html, I realized that it might be the encoding of the field in the table (the collation of the field in Navicat ) is inconsistent with the coding of the associated table field, which causes the error.
According to this idea, set a breakpoint to find the query SQL, check the test environment in the field code of these tables, and sure enough, the field encoding of one of the tables is inconsistent with the other table, the use is utf8_unicode_ci (the other table design encoding is UTF8_GENERAL_CI).
Test environment The table's encoding diagram
I borrowed a development environment when I debugged, so is there a difference in the coding of this table in the development and test environment? Then we looked at the configuration of the development environment, and there was a difference.
Development environment The table's encoding diagram
Speculation is that the development environment has changed the table coding rules have not been updated to the test environment, so the test environment of the table coding and development environment differences, resulting in the development environment debugging normal, but in the test environment debugging error.
Even if the day has been sublimated, I hope beginner's mind not.
----------Ccb_warlock
C # program connects to MySQL, reported "illegal mix of collations (utf8_general_ci,implicit) and (utf8_unicode_ci,implicit) for operation ' = '" Solutions for