Mysql provides a set of c api functions that can directly manipulate the database (which is powerful). To develop a client program with VC, you need to connect to a remote database.
Step 1: Create a MYSQL "object" and initialize it (required in this document );
Step 2: Connect using the mysql_real_connect function. We do not recommend using mysql_connect (this is an earlier version );
Note: The connection is established through TCP/IP, so the IP address of the server is entered for HOST, for example, 166. 111 .***.***
Second, provide the login name (USER) and password (PWD), and the default connected database name.
When Mysql is built on a linux server, there is naturally a linux Password verification.
I don't know any good method. I just tried to set the username and pwd of the database to be consistent with that of linux, and then I tried to pass