List:MySQL++« Previous MessageNext Message »
From:Leonty Belskiy Date:June 10 2010 4:41pm
Subject:Re: Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (2)
View as plain text  
Just checked mysqladmin and /etc/my.cnf and my socket is on
'/var/run/mysql/mysql.sock'.
So why it tries to connect to /var/lib/mysql/mysql.sock if I don't specify it?

I know I can specify when connecting but I want users to be able to
change the host by themselves:
http://tangentsoft.net/mysql++/doc/html/refman/classmysqlpp_1_1Connection.html

How do I change the socket address mysqlpp uses by default? I there
any other file like my.cnf that overrides the option?

Leonti

On Thu, Jun 10, 2010 at 6:05 PM, Leonty Belskiy <prishelec@stripped> wrote:
> It's not hardoced - all I do is create new mysqpp::Connection(false)
> and then call ->connect() passing db info.
>
> I will try to find out how it connects.
>
> Thanks for replying!
>
> On Thu, Jun 10, 2010 at 5:58 PM, Jonathan Wakely <mysql@stripped> wrote:
>> Is the /var/lib/mysql/mysql.sock path hardcoded into your app, or
>> given to it via a config file?
>>
>> The path could have changed due to the upgrades, so the app is trying
>> to connect with the wrong path. Or an upgrade could have disabled the
>> unix socket, so you need to conenct via TCP. Try to determine how the
>> command line client connects.
>>
>
Thread
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)Leonty Belskiy10 Jun
  • Re: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)Mengmeng Zhang10 Jun
    • Re: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)Mengmeng Zhang10 Jun
      • Re: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)Leonty Belskiy10 Jun
        • Re: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)Jonathan Wakely10 Jun
          • Re: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)Leonty Belskiy10 Jun
            • Re: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)Leonty Belskiy10 Jun
              • Re: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'(2)Warren Young14 Jun