Click here to Skip to main content
15,884,629 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
At least I managed to write a code using MySQL C++ Connector and it worked :-) Now I'm going to run it on another machine and I don't know how. Do I need to install the whole MySQL server on that target machine? Do I need to beg the user to do that? :-D
Posted

1 solution

You do not need to install a new MySQL server. You only need the DLL that for MySQL C++ Connector.
In your connection string, you den specify the IP address or host name where the MySQL server is running.
Remember to have the right username and password.
 
Share this answer
 
Comments
Joseph Marzbani 10-Nov-11 2:00am    
That 's the exact point. Where should I have that MySQL server? On the target machine, right? If this is the case then the user should do some configuration, right again?
Kim Togo 10-Nov-11 2:07am    
Where the MySQL is installed is up to you.
If you have 4 computers, then 1 computer can have the MySQL server installed and the other 3 computers can access the computer where the MySQL server is running.

All users are accessing the same MySQL server.
Joseph Marzbani 10-Nov-11 2:17am    
Let's be more clear. I have a MySQL database and an application using it. Now I want to run that application on other machines without MySQL server running on them. What files should I ship along with the applications itself?
Kim Togo 10-Nov-11 2:27am    
On the other computer, copy your program .exe file and mysqlcppconn.dll file or if you have compiled it with a static .lib file "mysqlcppconn-static.lib" you only need the .exe file.

when you create a MySQL_Connection object, you then specify IP address where the MySQL server is running, a valid username and password.

Example:
sqlConnection = new MySQL_Connection("192.168.1.100", "myusername", "mypassword");
Joseph Marzbani 10-Nov-11 2:48am    
do you mean the user will need a connection to the Internet or something? :-(

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900