MySQL not starting

Xuru

Verified User
Joined
Nov 10, 2003
Messages
71
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

Verified User
Joined
Nov 10, 2003
Messages
71
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?
 

Xuru

Verified User
Joined
Nov 10, 2003
Messages
71
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

Administrator
Staff member
Joined
Feb 27, 2003
Messages
8,961
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

Verified User
Joined
Oct 22, 2003
Messages
163
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

Verified User
Joined
Nov 10, 2003
Messages
71
That worked, I edited the file and rebooted and now MySQL is running. My start section now looks like this.


Code:
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

Verified User
Joined
Oct 22, 2003
Messages
163
Uh, you're right, I didn't add it right after start) but above the mysqld_safe command :S
 
Top