To solve this exception, you need to ensure normal operation
MySqlConnection conn;// Represents an open connection to a MySQL database. This class cannot be inherited
MySqlCommand comm;// Represents the SQL statement to execute on the MySQL database. This class cannot be inherited
MySqlDataAdapter adapter;// Represents a set of data commands and database connections for populating datasets and updating MySQL databases. This class cannot be inherited.
The exceptions of error reporting are as follows
MySql.Data.MySqlClient.MySqlException:“SSL Connection error.”
IOException: unable to read data from the transport connection: an established connection was aborted by the software in your host
Connection string (exception)
string mysqlconn = "server=127.0.0.1;port=3306;user=root;password=root;database=wpfstudy;";
Connection string (normal)
string mysqlconn = "server=127.0.0.1;port=3306;user=root;password=root;database=wpfstudy;SslMode = none;";
Add the following statement to the connection string
SslMode = none;
When using. Net/C # to operate MySQL database, the default value of sslmode is preferred. If the server supports it, please use SSL
SSL (secure socket layer) uses data encryption, authentication and message integrity verification mechanisms to provide security assurance for application layer protocols based on reliable connections such as TCP. If the user’s transmission is not through SSL, the data in the network is transmitted in plaintext, which brings an opportunity for people with ulterior motives. Therefore, many large websites now have SSL enabled. Similarly, in our database, if the client connects to the server to obtain data instead of using SSL connection, the data may be stolen during transmission.
The functions provided by SSL protocol mainly include:
1. Confidentiality of data transmission: use symmetric key algorithm to encrypt the transmitted data
2. Authentication mechanism: use digital signature method to authenticate the server and client based on certificate, and the authentication of the client is optional
3. Message integrity verification: MAC algorithm is used to verify message integrity during message transmission.
Read More:
- C# connection MySQL error: SSL connection error [Solved]
- Mysql Flashback Warning: C:\Program Files\MySQL\MySQL Server 8.0\bin\mysql.exe
- Remote connection to MySQL database error: is not allowed to connect to this MYSQL server solution
- [Solved] ERROR 2002 (HY000): Can’t connect to local MySQL server through socket’/var/lib/mysql/mysql.sock’ (2)
- MYSQL Enter password:ERROR 2003 (HY000): Can‘t connect to MySQL server on ‘localhost:3306‘
- MySql Install Error: Can‘t connect to local MySQL server through socket ‘/tmp/mysql.sock‘
- [Solved] MYSQL Command Execute Error: Can ‘t connect to local MySQL server through socket ‘/tmp/mysql.sock ‘(2) “
- host ‘‘ is not allowed to connect to this mysql server Connect MYSQL Error
- How to Solve can‘t connect to local mysql server through socket ‘/var/lib/mysql/mysql.sock‘
- How to Solve c3p0 connect mysql8.0 Error
- ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’
- Mysqlclient Error: ERROR: No matching distribution found for mysqlclient/OSError: mysql_config not found
- MYSQL Insert Data Error: check the manual that corresponds to your MySQL server version for the right syntax
- (Fixed) workbench MySQL Error Code: 2013. Lost connection to MySQL server during query
- [Solved] C# connecting to MySQL database reports an error
- [Solved] Windows MYSQL Error: django.db.utils.OperationalError: (2026, ‘SSL connection error: unknown error number‘)
- MySQL Install Error: MySQL error 1042: Unable to connect to any of the specified MySQL hosts
- How to Fix MySQL ERROR 1130 (HY000): Host ‘XXXX’ is not allowed to connect to this MySQL server
- [Solved] FATAL ERROR: please install the following Perl modules before executing /application/mysql/scripts/mysql_install_db: Data::Dumper
- SqlSugar Connect MySql 8.0.29 Error [How to Solve]