I've been setting up a Linux server at home to have for projects on the
side. I'm new to Linux game, but I think I've got everything set up okay.
The only trouble I'm having is getting MySQL to start up when the server
boots. I thought I'd ask here first--in case I have something w/ MySQL
configured wrong--before I pester the Linux folk.
When the system boots you can watch all the rc.d scripts' status. It seems
to think that mysql started up just fine, however, once I get logged in,
there is no mysqld process running. This is what is in the mysql.log file:
011114 06:32:58 mysqld started
011114 6:32:59 Can't start server : Bind on unix socket: Permission denied
011114 6:32:59 Do you already have another mysqld server running on
socket: /var/lib/mysql/mysql.sock ?
011114 6:32:59 Aborting
011114 06:32:59 mysqld ended
The answer is no I don't unless the start up script is somehow getting
executed twice, but if that were the case wouldn't there still be an
instance of mysqld running?
I followed the discussion about the shutdown script and wondered if there
might be something in the startup script that is wrong, but it looks fine to
me:
start(){
touch /var/log/mysqld.log
chown mysql.mysql /var/log/mysqld.log
chmod 0640 /var/log/mysqld.log
if [ ! -d /var/lib/mysql/mysql ] ; then
action $"Initializing MySQL database: "
/usr/bin/mysql_install_db
ret=$?
chown -R mysql.mysql /var/lib/mysql
if [ $ret -ne 0 ] ; then
return $ret
fi
fi
chown mysql.mysql /var/lib/mysql
chmod 0755 /var/lib/mysql
/usr/bin/safe_mysqld --defaults-file=/etc/my.cnf >/dev/null 2>&1 &
ret=$?
if [ $ret -eq 0 ]; then
action $"Starting $prog: " /bin/true
else
action $"Starting $prog: " /bin/false
fi
[ $ret -eq 0 ] && touch /var/lock/subsys/mysqld
return $ret
}
I changed the output to go to a file instead of /dev/null, but there is no
useful information there.
This is all there is to the /etc/my.cnf file:
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
[mysql.server]
user=mysql
basedir=/var/lib
[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
This is the standard installation that comes w/ RedHat 7.1. The database
works fine...once I start it up, that is.
Is there someone out there who can help me figure out what is wrong?
I will be out of town all week next week, so I am going to unsubscribe from
the list. A weeks' worth of messages will jam up my mailbox. I would
appreciate it if you would copy me on any replies to the list.
([EMAIL PROTECTED])
Thanks.
-Sean Hammon
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php