[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] MySQL Password
- Subject: Re: [cobalt-users] MySQL Password
- From: shimi <shimi@xxxxxxxxxxxxxxxx>
- Date: Tue Apr 24 14:27:38 2001
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
On Tue, 24 Apr 2001, Steve Werby wrote:
> "TWooly" <twooly@xxxxxxxx> wrote:
> > When I try to restart it I get this
> > starting mysqld daemon with databases from /var/lib/mysql
> > mysqld daemon ended
> >
> > Looks like it won't start backup now. What can i do
>
> Todd, it looks like you weren't logged in as the right user when you started
> mysql. The correct user is probably either 'mysql' or 'root' so use 'su' to
> become 'mysql' and then start mysql. If that doesn't work su to root (this
> isn't a very secure setup if mysql runs as root, but that's a different
> story).
>
The problem really resides with some wrong permissions set on the
/var/lib/mysql directory... it happend to me too..
anyhow when you write stuff to mysql as root, it changes the uid and the
gid of the files to root too... but changing to mysql is not enough... you
need to have the directory +x as well (that's why it works in root,
because in root you can enter non +x directories)...
so, I would do:
1) cd /var/lib
chown mysql mysql
chown -R mysql mysql
chgrp mysql mysql
chgrp -R mysql mysql
chmod 750 mysql
chmod -R 750 mysql
and then run mysql with safe_mysqld --user=mysql
I personally modified safe_mysqld to contain --user=mysql internally after
I made sure it's working...
the processlist then looks like this:
[shimi@www mysql]$ ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
[...]
root 27992 0.0 0.0 1536 0 ? SW Apr14 0:00 [safe_mysqld]
mysql 28009 0.0 1.6 10932 1072 ? SN Apr14 0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mys
mysql 28011 0.0 1.6 10932 1072 ? SN Apr14 0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mys
mysql 28012 0.0 1.6 10932 1072 ? SN Apr14 0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mys
[...]
[shimi@www mysql]$
> --
> Steve Werby
> President, Befriend Internet Services LLC
> http://www.befriend.com/
- shimi.