Re: Can't connect to local MySQL server through socket '/tmp/mysql.sock

2008-07-11 Thread Steve Bertrand

Òàðàñ wrote:

Hi! I need two MySQL servers run simultaneously. But when I try to run server I 
have

 ERROR 2002 (HY000): Can't connect to local MySQL server through socket 
'/tmp/mysql.sock' (2)


Does this happen when you try to start the first instance, or starting 
the second instance when you already have one started.


If the latter is the case, you are going to have to tell the second 
instance to use a different socket file.


# touch /tmp/mysql.sock2
# chmod mysql_user:mysql_group /tmp/mysql.sock2

and then, I believe if you add this to your /etc/my.cnf file:

[mysqld]
socket=/tmp/mysql.sock2

This should start at least one of your instances on the new socket, 
leaving the other one alone.


Note: I have not tested the above, its off the top of my head. Be worth 
Googling for verification.


Steve
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Can't connect to local MySQL server through socket '/tmp/mysql.sock

2008-07-11 Thread Steve Bertrand

Steve Bertrand wrote:

Òàðàñ wrote:
Hi! I need two MySQL servers run simultaneously. But when I try to run 
server I have



and then, I believe if you add this to your /etc/my.cnf file:

[mysqld]
socket=/tmp/mysql.sock2


...after thinking about it, this would likely cause both daemons to use 
the new socket file.


Perhaps a better approach would be to start mysqld with the 
--socket=/tmp/mysql.sock2 argument, leaving /etc/my.cnf as is.


Steve
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Can't connect to local MySQL server through socket '/tmp/mysql.sock

2008-07-11 Thread Mel
On Friday 11 July 2008 15:46:25 Тарас wrote:
 Hi! I need two MySQL servers run simultaneously.

Why?

 But when I try to run 
 server I have

  ERROR 2002 (HY000): Can't connect to local MySQL server through socket
 '/tmp/mysql.sock' (2)

Use jails if you have really need to, or start each of them with different 
configuration file, so that you can change:
- socket
- listen address/networking
- data directory
- log directory
- possibly something Im forgetting
-- 
Mel

Problem with today's modular software: they start with the modules
and never get to the software part.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]