FAQ
A couple of days ago, I decided to be brave (or crazy :-) and upgrade
my Ubuntu "Breezy" install to "Dapper". It was really remarkably
uneventful, I've just got a couple of rough edges to sort out.

One is that dspam (3.4.9 built by me some months ago) can no longer
connect to mysql when I reboot the machine. The problem appears to be
permissions related. On boot, /var/run/mysqld is owned by mysql and in
the root group with 770 permissions. That means that dspam can't open
/var/run/mysqld/mysqld.sock to connect to the database.

I've been fixing the problem with

chgrp mysql /var/run/mysqld
chmod 775 /var/run/mysqld

but (1) is that the safe and correct thing to do and (2) if it is, how
can I get mysql to do that by default when it starts?

Be seeing you,
norm

--
Norman Walsh <ndw@nwalsh.com> | We have fewer friends than we imagine,
http://nwalsh.com/ | but more than we know.--Hugo Von
Hofmannsthal

Search Discussions

  • Sheeri kritzer at Feb 20, 2006 at 5:56 pm
    That's odd. My mysql.sock is chmod 777, which happened automatically.

    Check the startup script. Is it calling mysqld_safe? Are you using
    the regular startup script that came with mysql, or have you mucked
    with it?

    Make sure when you chmod that the file is still a socket. Shouldn't
    be a problem.

    I don't really have much to add.

    a quick google search on "mysql.sock permissions" shows this bug:

    http://bugs.mysql.com/bug.php?id=11380

    did you also upgrade mysql when you did the OS upgrade ? If so, backup
    your stuff and run mysql_install_db. That's the only suggestion I
    have, other than doing a google search as I did and look at more than
    the first 2 results (which was what I did to find that bug).

    -Sheeri
    On 2/19/06, Norman Walsh wrote:
    A couple of days ago, I decided to be brave (or crazy :-) and upgrade
    my Ubuntu "Breezy" install to "Dapper". It was really remarkably
    uneventful, I've just got a couple of rough edges to sort out.

    One is that dspam (3.4.9 built by me some months ago) can no longer
    connect to mysql when I reboot the machine. The problem appears to be
    permissions related. On boot, /var/run/mysqld is owned by mysql and in
    the root group with 770 permissions. That means that dspam can't open
    /var/run/mysqld/mysqld.sock to connect to the database.

    I've been fixing the problem with

    chgrp mysql /var/run/mysqld
    chmod 775 /var/run/mysqld

    but (1) is that the safe and correct thing to do and (2) if it is, how
    can I get mysql to do that by default when it starts?

    Be seeing you,
    norm

    --
    Norman Walsh <ndw@nwalsh.com> | We have fewer friends than we imagine,
    http://nwalsh.com/ | but more than we know.--Hugo Von
    Hofmannsthal
  • Norman Walsh at Feb 22, 2006 at 5:06 pm
    / "sheeri kritzer" <awfief@gmail.com> was heard to say:
    That's odd. My mysql.sock is chmod 777, which happened automatically.
    Yes, the mysql.sock file is 777. But the directory that contains it
    /var/run/mysqld is 770 on boot.
    Check the startup script. Is it calling mysqld_safe? Are you using
    the regular startup script that came with mysql, or have you mucked
    with it?
    I didn't muck with it. I don't know if Ubuntu did.
    Make sure when you chmod that the file is still a socket. Shouldn't
    be a problem.
    As I said, it isn't the socket that I have to change, it's the
    directory.

    >
    I don't really have much to add. >
    a quick google search on "mysql.sock permissions" shows this bug: >
    http://bugs.mysql.com/bug.php?id=11380 >
    did you also upgrade mysql when you did the OS upgrade ? If so, backup
    your stuff and run mysql_install_db. That's the only suggestion I
    have, other than doing a google search as I did and look at more than
    the first 2 results (which was what I did to find that bug).
    I looked through a whole bunch of them before subscribing to this list :-)

    However, your note got me to looking at /usr/bin/mysqld_safe and it
    would seem to me that either of the following changes would fix the
    problem:

    1. Change umask 007 to umask 002 at the top of the script or

    2. Add "chmod 775 $mysql_unix_port_dir" after creating and chowning it.

    I opted for the latter locally. But I'm not sure why others don't have
    this problem. Are either of those changes local to Ubuntu?

    Be seeing you,
    norm

    --
    Norman Walsh <ndw@nwalsh.com> | Everything should be made as simple as
    http://nwalsh.com/ | possible, but no simpler.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupmysql @
categoriesmysql
postedFeb 19, '06 at 8:02p
activeFeb 22, '06 at 5:06p
posts3
users2
websitemysql.com
irc#mysql

2 users in discussion

Norman Walsh: 2 posts Sheeri kritzer: 1 post

People

Translate

site design / logo © 2022 Grokbase