Re: [Cppcms-users] cppdb::session: change from Unix socket to remote connection.
Brought to you by:
artyom-beilis
|
From: Nazım C. B. <naz...@ne...> - 2017-04-10 22:46:31
|
Hello,
Sorry, it is 'protocol=TCP', not 'protocol=socket'.
cppdb::session
sql("mysql:protocol=|TCP|;host=localhost;port=3306;database=db;user=user;password='password';@module=./libcppdb_mysql.so");
On 11/04/17 01:19, Nazım Can Bedir wrote:
>
> Hello,
>
> According to
> https://dev.mysql.com/doc/refman/5.5/en/mysql-options.html, this may work;
>
> cppdb::session
> sql("mysql:protocol=socket;host=localhost;port=3306;database=db;user=user;password='password';@module=./libcppdb_mysql.so");
>
> Regards,
> Nazim Can.
>
> On 11/04/17 00:46, Richard Szibele wrote:
>> Hello,
>>
>> when executing:
>>
>> cppdb::session
>> sql("mysql:host=localhost;port=3306;database=db;user=user;password='password';@module=./libcppdb_mysql.so");
>>
>> I get the following exception:
>>
>> what(): cppdb::mysql::Can't connect to local MySQL server through
>> socket '/run/mysqld/mysqld.sock' (2 "No such file or directory")
>>
>> How can I specify cppdb::session to use the host and port for my MySQL
>> server and not Unix sockets?
>>
>> Perhaps I am missing something, but it does not seem clear from the
>> documentation at:
>> http://cppcms.com/sql/cppdb/connstr.html
>> and
>> http://cppcms.com/sql/cppdb/mysql.html
>>
>> Kind regards,
>> Richard Szibele
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org!http://sdm.link/slashdot
>> _______________________________________________
>> Cppcms-users mailing list
>> Cpp...@li...
>> https://lists.sourceforge.net/lists/listinfo/cppcms-users
>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>
>
> _______________________________________________
> Cppcms-users mailing list
> Cpp...@li...
> https://lists.sourceforge.net/lists/listinfo/cppcms-users
|