List:MySQL++« Previous MessageNext Message »
From:Michael Gale Date:March 11 2005 6:58am
Subject:Re: Change mysql server and username in simple ?
View as plain text  
Nevermind ...

Michael.


Michael Gale wrote:
> 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.
> 
Thread
Change mysql server and username in simple ?Michael Gale11 Mar
  • Re: Change mysql server and username in simple ?Michael Gale11 Mar
  • Re: Change mysql server and username in simple ?Warren Young11 Mar