Click to See Complete Forum and Search --> : Getting Mysql to start in slackware


Gallienus
02-19-2007, 03:51 AM
I'm having a little trouble getting mysql to start automatically in Slackware 11.0. During the install I selected the option to have mysql start automatically. Now when I boot slackware it states the the mysqld daemon is starting but then I get this message.
STOPPING server from pid file /var.run/mysql/mysql.pid.

I read the comments in rc.mysqld and did exactly what the file said and still I can't get mysql to start.


Any advice would be welcomed

stumbles
02-19-2007, 07:42 AM
Try deleting the mysql.pid and then restart the service.

Gallienus
02-19-2007, 05:48 PM
There is no pid to delete.

voidinit
02-20-2007, 12:41 AM
It looks like slackware's init is indeed attempting to start MySQL at startup, but MySQL is failing to start. Most likely due to something inane like bad file permissions on the data directory, or whatever.

Try running mysql's init script by hand [ probably something like /etc/rc.d/rc.msyql ] and see if the same thing occurs. I'm betting it probably will. After that, find out where mysqld is putting it's log file. Chances are it's somewhere under /var/log, or it might be in mysql's datadir under hostname.log.err or something like that. As a last resort you can look at /etc/my.cnf and see if log-err=/path is specified anywhere in there. Look at the log and it will explain why mysqld is failing to start.

aNoob
02-20-2007, 08:43 AM
I have posted this earlier (I'm too lazy to look for it, so I will write it again)
If mysql attempts to start at boot but it errors out then you have to run the db script first. If not, use pkgtool to start the mysql service at boot.
So, if mysql service is attempting to start at boot , but it fails , you do this :
as root : mysql_install_db
as root : chown -R mysql.mysql /var/lib/mysql
as root : /usr/bin/mysqld_safe --user=mysql & (this will start the daemon safe)
open another terminal to check if is running and issue ps -e | grep my. Now it's time to connect for the first time if you see mysql running :
mysql -u root
If you have a mysql prompt , then everything is fine an dandy and you will have to go on configuration (change password for root etc)