The purpose of writing this mini program is to test the connection to the remote database on the server.
Sometimes, the remote database execution is unsuccessful, and then the remote MySQL 3306 port is open again
I don't know, whether it's a mysql permission problem or a problem with your other project code, you can use this mini program to test it
App.config is the program's configuration file, SqlConn is the database connection string, and Sql is the sql statement to be executed,
The code is as follows:
Program and source code download:
Tourists, if you want to see the hidden content of this post, please Reply
|