Mailing List Archive

MYSQL screwed after reboot
I rebooted my server to make sure it was reading my new /etc/hosts,
/etc/hostname, and /etc/dnsdomainname and I brought my daemons up
manually. mysql seemed to start OK, but another daemon was
complaining because it couldn't connect to the mysql socket. There is
no socket file in /var/run/mysqld. I tried to restart mysql and it
errored. My mysql.err file looks like this:

-----
040929 06:40:10 mysqld started
Warning: Ignoring user change to 'mysql' because the user was set to
'mysql' earlier on the command line
040929 6:40:10 Can't start server : Bind on unix socket: Permission denied
040929 6:40:10 Do you already have another mysqld server running on
socket: /var/run/mysqld/mysqld.sock ?
040929 6:40:10 Aborting

040929 6:40:10 /usr/sbin/mysqld: Shutdown Complete

040929 06:40:10 mysqld ended

040929 06:41:38 mysqld started
Warning: Ignoring user change to 'mysql' because the user was set to
'mysql' earlier on the command line
040929 06:41:38 mysqld ended
-----

The /var/run/mysql folder's group was mysql but the owner was 60 so I
changed that to mysql, but still no luck. Does anyone know what's
wrong?

- Grant

--
gentoo-user@gentoo.org mailing list
Re: MYSQL screwed after reboot [ In reply to ]
> I rebooted my server to make sure it was reading my new /etc/hosts,
> /etc/hostname, and /etc/dnsdomainname and I brought my daemons up
> manually. mysql seemed to start OK, but another daemon was
> complaining because it couldn't connect to the mysql socket. There is
> no socket file in /var/run/mysqld. I tried to restart mysql and it
> errored. My mysql.err file looks like this:
>
> -----
> 040929 06:40:10 mysqld started
> Warning: Ignoring user change to 'mysql' because the user was set to
> 'mysql' earlier on the command line
> 040929 6:40:10 Can't start server : Bind on unix socket: Permission denied
> 040929 6:40:10 Do you already have another mysqld server running on
> socket: /var/run/mysqld/mysqld.sock ?
> 040929 6:40:10 Aborting
>
> 040929 6:40:10 /usr/sbin/mysqld: Shutdown Complete
>
> 040929 06:40:10 mysqld ended
>
> 040929 06:41:38 mysqld started
> Warning: Ignoring user change to 'mysql' because the user was set to
> 'mysql' earlier on the command line
> 040929 06:41:38 mysqld ended
> -----
>
> The /var/run/mysql folder's group was mysql but the owner was 60 so I
> changed that to mysql, but still no luck. Does anyone know what's
> wrong?
>
> - Grant

I was able to fix this by changing the ownership of /var/lib/mysql/*
to mysql from 60. Does anyone know how this might have happened?

- Grant

--
gentoo-user@gentoo.org mailing list
Re: Re: MYSQL screwed after reboot [ In reply to ]
On Wed, 2004-09-29 at 13:07, Grant wrote:
> I was able to fix this by changing the ownership of /var/lib/mysql/*
> to mysql from 60. Does anyone know how this might have happened?

This might sound too obvious but it appears that the user with UID 60
was removed. Has /etc/passwd been edited or updated recently?

--
Owen Ford <oford@arghblech.com>

() ascii ribbon campaign - against html e-mail
/\ - against proprietary attachments
Re: Re: MYSQL screwed after reboot [ In reply to ]
> > I was able to fix this by changing the ownership of /var/lib/mysql/*
> > to mysql from 60. Does anyone know how this might have happened?
>
> This might sound too obvious but it appears that the user with UID 60
> was removed. Has /etc/passwd been edited or updated recently?
>
> --
> Owen Ford <oford@arghblech.com>

I did add a couple of users for mail. How could that be involved with this?

- Grant

--
gentoo-user@gentoo.org mailing list
Re: Re: MYSQL screwed after reboot [ In reply to ]
On Thu, 2004-09-30 at 21:49, Grant wrote:
> > > I was able to fix this by changing the ownership of /var/lib/mysql/*
> > > to mysql from 60. Does anyone know how this might have happened?
> >
> > This might sound too obvious but it appears that the user with UID 60
> > was removed. Has /etc/passwd been edited or updated recently?
>
> I did add a couple of users for mail. How could that be involved with this?

When a username is either too long or no longer exists, ls can no longer
"resolve" it to a name so it just displays the UID. Same with GID.

This is a "to the best of my knowledge" answer. I'm unsure where this
is documented but this seems to be how this works in practice.

I'd recommend that you less /etc/passwd and see if anyone is using UID
60 and see what the UID of mysql is. I suspect that the previous owner
no longer exists. If that is the case you should probably just chown
the file to mysql.

--
Owen Ford <oford@arghblech.com>

() ascii ribbon campaign - against html e-mail
/\ - against proprietary attachments
Re: Re: MYSQL screwed after reboot [ In reply to ]
> > > > I was able to fix this by changing the ownership of /var/lib/mysql/*
> > > > to mysql from 60. Does anyone know how this might have happened?
> > >
> > > This might sound too obvious but it appears that the user with UID 60
> > > was removed. Has /etc/passwd been edited or updated recently?
> >
> > I did add a couple of users for mail. How could that be involved with this?
>
> When a username is either too long or no longer exists, ls can no longer
> "resolve" it to a name so it just displays the UID. Same with GID.
>
> This is a "to the best of my knowledge" answer. I'm unsure where this
> is documented but this seems to be how this works in practice.
>
> I'd recommend that you less /etc/passwd and see if anyone is using UID
> 60 and see what the UID of mysql is. I suspect that the previous owner
> no longer exists. If that is the case you should probably just chown
> the file to mysql.
>
>
>
> --
> Owen Ford <oford@arghblech.com>

I have this in /etc/passwd:

mysql:x:1001:60::/home/mysql:/bin/bash

This user still exists right? Does this make sense to you?

- Grant

--
gentoo-user@gentoo.org mailing list
Re: Re: MYSQL screwed after reboot [ In reply to ]
On Thu, 2004-09-30 at 22:38, Grant wrote:
> > > > > I was able to fix this by changing the ownership of /var/lib/mysql/*
> > > > > to mysql from 60. Does anyone know how this might have happened?
<snip>
> I have this in /etc/passwd:
>
> mysql:x:1001:60::/home/mysql:/bin/bash
>
> This user still exists right? Does this make sense to you?

Looks like the user was removed and recreated at some point.

Mine is 60:60 and portage tends to give the same uid and gid to
important services/accounts.
--
Owen Ford <oford@arghblech.com>

() ascii ribbon campaign - against html e-mail
/\ - against proprietary attachments
Re: Re: MYSQL screwed after reboot [ In reply to ]
Owen Ford wrote:

> When a username is either too long or no longer exists, ls can no longer
> "resolve" it to a name so it just displays the UID. Same with GID.

from what I see, long usernames just get truncated...

also, if a particular user doesn't have access to /etc/passwd, then it
can't resolve the UID either, so it displays the numbers.

Try it :)

chmod 600 /etc/passwd; su user -c "ls -l ~";chmod 644 /etc/passwd

you'll just see just UID's

--
gentoo-user@gentoo.org mailing list
Re: Re: MYSQL screwed after reboot [ In reply to ]
> > > > > > I was able to fix this by changing the ownership of /var/lib/mysql/*
> > > > > > to mysql from 60. Does anyone know how this might have happened?
> <snip>
> > I have this in /etc/passwd:
> >
> > mysql:x:1001:60::/home/mysql:/bin/bash
> >
> > This user still exists right? Does this make sense to you?
>
> Looks like the user was removed and recreated at some point.
>
> Mine is 60:60 and portage tends to give the same uid and gid to
> important services/accounts.

Ok, thanks for your help. At least I'll know where to look next time.

- Grant

--
gentoo-user@gentoo.org mailing list
Re: Re: MYSQL screwed after reboot [ In reply to ]
On Fri, 2004-10-01 at 09:07, Billy wrote:
> Owen Ford wrote:
>
> > When a username is either too long or no longer exists, ls can no longer
> > "resolve" it to a name so it just displays the UID. Same with GID.

> from what I see, long usernames just get truncated...

I have seen both behaviors.

> also, if a particular user doesn't have access to /etc/passwd, then it
> can't resolve the UID either, so it displays the numbers.

I'm not sure how gentoo handles it (or if that is even a configurable
parameter) but I do know that some RH 7 and RH 9 boxes that I used to
work on would not truncate. They just displayed the uid even when the
user could read p/etc/passwd. It was really annoying.
--
Owen Ford <oford@arghblech.com>

() ascii ribbon campaign - against html e-mail
/\ - against proprietary attachments
Re: Re: MYSQL screwed after reboot [ In reply to ]
For some reason whenever i try to emerge portage, after it reaches:

lib/Net/t/hostname........................

it hangs and stays there for ever, my system still works but i cant
complete the emerge.

IF any one has a clue about this, ill be very grateful.

regards

Rafael Barrera Oro


--
gentoo-user@gentoo.org mailing list
Re: Re: MYSQL screwed after reboot [ In reply to ]
On Fri, 1 Oct 2004, Owen Ford wrote:

> I'm not sure how gentoo handles it (or if that is even a configurable
> parameter) but I do know that some RH 7 and RH 9 boxes that I used to
> work on would not truncate. They just displayed the uid even when the
> user could read p/etc/passwd. It was really annoying.

The bugs in RH8 and RH9 are really annoying! ;-)


--
since time T equals minus infinity adv.

A long time ago;
for as long as anyone can remember; at the time that some
particular frob was first designed. Usually the word `time' is
omitted. See also time T; contrast epoch.


--
gentoo-user@gentoo.org mailing list