This error usually occurs for one of two reasons:

1. There is already a /tmp/mysql.sock. You've ruled this out.

2. The user mysqld runs as, typically mysql, does not have permission to write to /tmp. Normally, you would want to `chmod 1777 /tmp`. If that's not appropriate for a jail, just make sure that mysqld can write there.

As far as I know, installing (or reinstalling) mysql should have no effect on /tmp permissions, so I would guess that the problem you had previously with the second jail was different.

If it turns out that /tmp permissions are not the problem, take a look at the hostname.err (where hostname is the name of the machine from this jail's point of view) file in the data directory. If the contents don't make sense to you, post them in a follow-up message.

Michael

[EMAIL PROTECTED] wrote:

Thank you for the replies. Jail is a FreeBSD construction that provides a
chroot'ed environment that allows you to create another instance of the entire
OS. So in my case the physical server running the jails appears to the world
like 5 hosts. Each jail has its own IP and is running an independent version of
FreeBSD. The jail API layer keeps one instance of a jail from breaking into
jail. Only the /proc file system is shared. The kernel belongs to the base
system.

I was hoping for a FreeBSD/mysql person who has traveled this road. Failing
that, is there some residual file that MySQL uses that could trigger this error?
I can tell for sure that:

  1) there is no mysql socket active
  2) there is no file /tmp/mysql.sock (in this jail).
  3) it is possible to do.

The only reason I have to suspect something in mysql is that I had to re-install
to get my second jail running mysql. The re-install did not work here but I did
not build the failing jail from scratch. Hence my thought that I left some
"cruft" behind. The reinstall should have cleared /usr/local of mysql files and
I cleared /var/db/mysql and /tmp by hand.

I think the MySQL question here is: Can a configuration error cause mysqld to
think a socket is open when in fact it is not?

On Wed, 3 Mar 2004, Rhino wrote:


Maybe you could explain what a "jail" is. In 20+ years doing systems work
I've never heard that term mean anything but "a place where criminals are
locked up".

Rhino

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 03, 2004 11:28 AM
Subject: mysql in a jail



I have a system running FreeBSD 4.9 four jails. MySQL is running in two of

the


jails and I am trying to add it to a 3rd jail. Starting the server gets

the


message:

 040302 19:34:15  mysql started
 040302 19:34:15  Can't start server : Bind on unix socket: Permission

denied


040302 19:34:15 Do you already have another mysqld server running on

socket:


                  /tmp/mysql.sock ?
 040302 19:34:15  Aborting
 040302 19:34:15  /usr/local/libexec/mysqld: Shutdown Complete
 040302 19:34:15  mysqld ended

The new jail was created by copying the file tree from a jail that had the
desired configuration and then doing clean-up as required. In response to

the


error I tried configuring mysqld to use a different port and socket file.

That


did not fix the problem. I had forgotten the other two mysql's are using

port


3306 and /tmp/mysql.sock.

I next removed mysql and its dependencies and reinstalled

mysql-server-4.0.16


using pkg_add. I am still getting the same error. At this point I think it

is a


jail problem with something I missed in clean-up but I do not know where

to look


next.

Having done all this, I recalled in installing the 2nd MySQL jail, it was
necessary to remove and reinstall mysql. In that instance the

re-installation


solved the problem.

Thanks for any ideas.

_____
Douglas Denault
[EMAIL PROTECTED]
Voice: 301-469-8766
 Fax: 301-469-0601

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



_____ Douglas Denault [EMAIL PROTECTED] Voice: 301-469-8766 Fax: 301-469-0601



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to