Quantcast
Channel: MySQL Forums - Connector/C++
Viewing all articles
Browse latest Browse all 527

connector not working on different machines (1 reply)

$
0
0
Hi

I have built MySQL Connector 1.1.0 C++ from source using Visual Studio 2008 on two different machines following the same procedure (both machines are using a windows XP operating system). I can compile and link to all the necessary libraries on both machines.

On machine A the example code connect.cpp runs and connects fine to my mysql database running on a separate linux machine.

On machine B the example code connect.cpp gets to line 73 which is:
std::auto_ptr< sql::Connection > con(driver->connect(url, user, pass));

and throws the error message:

# ERR: SQLException in .\connect.cpp<main> on line 214
# ERR: Lost connection to MySQL server at 'waiting for initial communication packet', system error: 0 <MySQL error code: 2013, SQLState: HY000 >
not ok 1 - examples/connect.php

I know the connection to the database is working because I can ping the database from both machines A and B as well as connect to the database using SQLyog on both.

Furthermore if I grab connect.exe, libmysql.dll, and mysqlcppconn.dll and throw them on a flash drive from machine B they will run and connect on machine A.

I do not understand why machine A would work fine, however machine B does not, even though the same procedure was used for both to build and run Connect C++. If someone could help me figure this out I would greatly appreciate it.

Thanks.

Viewing all articles
Browse latest Browse all 527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>