![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello, I am trying to change the host, username and password of the simple1 example. In the file simple1.cpp: --snip-- // Connect to the sample database mysqlpp::Connection con(mysqlpp::use_exceptions); if (!connect_to_db(argc, argv, con)) { return 1; } --snip I tried adding: --snip-- // Connect to the sample database mysqlpp::Connection con(mysqlpp::use_exceptions); con.connect("mysql_cpp_data","192.168.0.3","mytest ","mypass"); if (!connect_to_db(argc, argv, con)) { return 1; } --snip-- But it is not working ... I have tried a few variations but nothing ![]() When I run ./simple1 I receive: Error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) Michael. |
#3
| |||
| |||
|
|
I am trying to change the host, username and password of the simple1 example. |
![]() |
| Thread Tools | |
| Display Modes | |
| |