PDA

View Full Version : MySQL not starting


Xuru
01-12-2004, 12:09 PM
Just installed lasatest beta, looking at the services apge, everything is running but mysqld. The problem is I can't find any error messages as to why it isn't starting. I've checked all the logs in /usr/local/mysql/data and even gone through /var/logs. I'm just not finding where DA is having MySQL put any errors it may have. Where am I not looking?

Thanks

Xuru
01-12-2004, 01:10 PM
I just tried to start mysql manually and got this


sv013# /usr/local/mysql/bin/mysqld_safe
The file /usr/local/mysql/libexec/mysqld doesn't exist or is not executable
Please do a cd to the mysql installation directory and restart
this script from there as follows:
./bin/mysqld_safe.

I can run ./bin/mysqld_safe from the mysql dir and get it to run, but of course when I reboot it goes down. Is there supposed to be a /usr/local/mysql/libexec/mysqld?

DirectAdmin Support
01-13-2004, 10:07 AM
Hello,

What about running:

/usr/local/etc/rc.d/mysqld restart

John

Xuru
01-13-2004, 10:28 AM
sv013# /usr/local/etc/rc.d/mysqld restart

Usage: mysqld { start | stop }

sv013# /usr/local/etc/rc.d/mysqld start
Starting mysqld: [ OK ]


While it says that it started, it is wrong. I checked via cmd line and da, bith show no mysql running after that. The startup script deosn't seem to have the error checking needed to see that it is actually not starting.

DirectAdmin Support
01-13-2004, 10:49 AM
What happens if you add:

cd /usr/local/mysql

to the start) section in the /usr/local/etc/rc.d/mysqld file before it calls the mysqld program..

John

wdv
01-13-2004, 10:56 AM
That has no effect.

I added the cd /usr/local/mysql and after that a pwd.

Output:

su-2.05b# /usr/local/etc/rc.d/mysqld start
/usr/local/etc/rc.d
/usr/local/etc/rc.d/mysqld: ./bin/mysqld_safe: not found
Starting mysqld: [ OK ]

Xuru
01-13-2004, 10:58 AM
That worked, I edited the file and rebooted and now MySQL is running. My start section now looks like this.



start)
cd /usr/local/mysql
if [ -x /usr/local/mysql/bin/mysqld_safe ]; then
/usr/bin/limits -U mysql \
/usr/local/mysql/bin/mysqld_safe --user=mysql --datadir=${DB_DIR} --pid-file=${PIDFILE} > /dev/null &
if [ $? -ne 0 ]
then
echo -e 'Starting mysqld:\t\t[ FAILED ]'
else
echo -e 'Starting mysqld:\t\t[ OK ]'
fi
fi
;;

wdv
01-13-2004, 11:06 AM
Uh, you're right, I didn't add it right after start) but above the mysqld_safe command :S