RES: How to use mysql.

Hugo Osvaldo Barrera hugo at osvaldobarrera.com.ar
Wed Feb 1 00:29:08 EST 2012


On 2012-01-31 05:07, Quentin Stafford-Fraser wrote:
> On 31 Jan 2012, at 02:24, gnucash-user-request at gnucash.org wrote:
> 
>> "127.0.0.1" IS "localhost". "localhost" is just an alias for it. 
>> ...
>> Why it would be necessary to use the formal notation instead of the alias will 
>> remain a mystery.
> 
> Yes, this is in general true. However, when MySQL is making the connection to the database, on Unix systems at least, if there is no host specified, or the host is 'localhost', it will attempt to connect using Unix domain sockets, because these are more efficient  If anything else is specified, including 127.0.0.1, it will make a TCP connection.
> 
> So for MySQL, the two are not quite equivalent. And since Unix domain sockets live at a particular location in the file system, they can fail if a directory doesn't exist, for example.  Another possibility is that you have more than one MySQL installation on a machine, and the server is configured to use a socket at one location while the client libraries default to another.
> 
> I'm afraid I can't remember enough of the original post to know whether that might be the issue, but it's worth knowing about anyway!
> 
> Quentin

Hi,

Sorry about the two consecutive mails, but this got spam-filtered (false
positive) so I just noticed this after my previous reply.

This behaviour is confusing; I never configured MySQL to listen to a
unix-domain socket, and if GNUCash is atempting to connect through a
unix-domain socket (instead of connecting to a HOST, as specified when I
clicked "Save As..."), at least the error message should clarify this.

I filled in certain info, and GNUCash made *assumptions* that MySQL was
listening on a certain DIFFERENT socket, but the error never informed of
this, so I could never had guessed it.

I also tried localhost:3306 before my final solution. This case should
definitely *not* use a domain socket in any case.

> 
> 
> _______________________________________________
> gnucash-user mailing list
> gnucash-user at gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.


-- 
Hugo Osvaldo Barrera


More information about the gnucash-user mailing list