I deployed my mas interface yesterday.ProgramThe above title is incorrect.
Client IP Address: 192.168.1.100. The mas interface program is deployed on the client.
Server IP: 192.168.1.101, mysql4.0 database.
Program connection to MySQL: ODBC, Driver: MySQL ODBC driver5.1 (this is the driver used before connection failure)
The connection string is as follows (C #):
Connectionstring = "driver = {MySQL ODBC 5.1 Driver}; server = 192.168.1.101; Port = 3306; option = 131072; stmt =; database = MAS; user = root; Password = 123456 ". when this connection string is used to connect data, an exception is returned: unknow system varibles "character_set_results "...... I guess it's about character sets. I checked the MySQL Character Set documentation. Let's just briefly describe it ,.
1. character_set_database: ensure that the data stored in the database is consistent with the database encoding;
2. Ensure that the character sets for communication are consistent with those for databases, that is, character_set_client and character_set_connection are consistent with character_set_database;
3. Ensure that the returned results of select are encoded in the same way as those of the program, that is, character_set_results is encoded in the same way as the program;
4. Ensure that the program encoding is consistent with the browser encoding, that is, the program encoding is consistent with <meta http-equiv = "Content-Type" content = "text/html; charset =? "/> Consistent.
I changed the connection string and set character_set_results = uft8. This is really an annoying problem.
Fortunately, I calmly analyzed whether the driver version was a problem. My MySQL driver version is 5.1, and MySQL version is 4.0.
Download the driver from the official website, change the driver of driver3.51, and connect again!
Connectionstring = "driver = {MySQL ODBC 3.51 driver}; server = 192.168.1.101; Port = 3306; option = 131072; stmt =; database = MAS; user = root; Password = 123456"
You can't hide the joy of your heart! Hope to help you with the same problem!