Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can you help me get a service to start?

Status
Not open for further replies.

JustKIDn

MIS
May 6, 2002
386
US
Hi all,

I recently installed MySQL 4.0.12 (upgrade really) on my Caldera OpenLinux box.

The MySQL service doesn't start on boot-up. It never did, even with the old version. The original (3.22.x) was installed during the original OpenLinux install.

I originally started asking about this in the MySQL forum.

Please see this thread436-530321

This thread covers most of the details pretty well. But if you need more info, let me know and I'll try to get you what you need.

Thanks!

tgus

____________________________
Families can be together forever...
 
Tgus,
I have read all the posts from the other thread.

3 things:

1) Can you start the mysql server manually?

2) Type "chkconfig --list". Do you see something similar to:
ntpd 0:eek:ff 1:eek:ff 2:eek:ff 3:eek:ff 4:eek:ff 5:eek:ff 6:eek:ff
syslog 0:eek:ff 1:eek:ff 2:eek:n 3:eek:n 4:eek:n 5:eek:n 6:eek:ff
spamassassin 0:eek:ff 1:eek:ff 2:eek:ff 3:eek:ff 4:eek:ff 5:eek:ff 6:eek:ff


3) Goto the directory where the mysqld.server file is.
Do you have something similar to:



#!/bin/bash
#
# mysqld This shell script takes care of starting and stopping
# the MySQL subsystem (mysqld).
#
# chkconfig: - 78 12
# description: MySQL database server.
# processname: mysqld
# config: /etc/my.cnf
# pidfile: /var/run/mysqld/mysqld.pid


If you answered yes to the first 2 questions I would copy the bold stuff for question 3 and paste it at the top of your mysql.server file.

After saving the changes type:
chkconfig --add mysql.server
then type:
chkconfig --list mysql.server

and you should see something simlar to:

mysql.server 0:eek:ff 1:eek:ff 2:eek:ff 3:eek:ff 4:eek:ff 5:eek:ff 6:eek:ff

Now go delete all those links you created in your /etc/rc.d directory.

After the links are gone type:
chkconfig --level 345 mysql.server on

Now reboot the computer.

Of course none of this will work if you can't start the server manually to begin with.

If you answered no to question 1 or 2 then let us know.






 
Hi PcLinuxGuru,

1.) Yes, I can start it manually.

2.) No, the file chkconfig doesn't seem to exist in my system. (isn't that a Redhat file/command?)

3.) The following is at the top of my mysql.server file;

#!/bin/sh
# Copyright Abandoned 1996 TCX DataKonsult AB & Monty Program KB & Detron HB
# This file is public domain and comes with NO WARRANTY of any kind

# Mysql daemon start/stop script.

# Usually this is put in /etc/init.d (at least on machines SYSV R4
# based systems) and linked to /etc/rc3.d/S99mysql. When this is done
# the mysql server will be started when the machine is started.

# Comments to support chkconfig on RedHat Linux
# chkconfig: 2345 90 90
# description: A very fast and reliable SQL database engine.

PATH=/sbin:/usr/sbin:/bin:/usr/bin
basedir=/
bindir=/usr/bin
datadir=/var/lib/mysql
pid_file=/var/lib/mysql/mysqld.pid
mysql_daemon_user=mysql # Run mysqld as this user.
export PATH

Question:
How can I get the file date of mysql.server to be sure it's the correct version?

As you see in the other thread, it doesn't list the date. It gives me the time.

Is there a .log somewhere I can read? Like maybe a startup log.

Thanks, what's next?

tgus

____________________________
Families can be together forever...
 
Hmmm...
First try starting the mysql server from the rc.3 directory:

./S99mysql.server

If it seems to work then:

Try grep mysql /var/log/boot.log

This is going to search your boot log for mysql and if there are any startup errors they might be in there. If nothing obvious try grepping your messages file located in /var/log... like grep mysql /var/log/messages






 
PcLinuxGuru,

I tried what you said, this is what I got;

rc3.d]# S99mysql
bash: S99mysql: command not found

So I tried looking at the file and it shows just fine;

rc3.d]# more S99mysql
#!/bin/sh
# Copyright Abandoned 1996 TCX DataKonsult AB & Monty Program KB & Detron HB
# This file is public domain and comes with NO WARRANTY of any kind

# Mysql daemon start/stop script.


It appears to be Readable and eXecutable;

rc3.d]# ls -lah *my*
lrwxrwxrwx 1 root root 22 Apr 21 14:09 S99mysql -> ../init.d/mysql.server

And so is mysql.server;

-rwxr-xr-x 1 root root 2.7k Apr 8 23:14 mysql.server

I tried running mysql.server;

init.d]# mysql.server
bash: mysql.server: command not found

I wonder if 'command not found' means some command inside of mysql.server?

I greped those logs. boot.log doesn't exist. But I found 'lastlog' there was no reference to mysql in there.

I tried 'messages' and again, no references to mysql.

Could I have a bad copy of mysql.server?

tgus

____________________________
Families can be together forever...
 
You need to execute
[tt]./mysql.server[/tt]
unless you have the current directory in your [tt]PATH[/tt].

//Daniel
 
The command not found is a command inside the S99 file.... If you want could you paste the whole script and I can take a look and see if it something obvious....

 
No. If it would be inside the file, the error would be something like
[tt]<command>: line <number>: command not found[/tt]

//Daniel
 

I tried to run safe_mysqld (that's one file that's called in mysql.server). It doesn't work.

I tried mysqld_safe (the mysql version 4x version renamed). It didn't work.

I tried mysqld -u root and it worked.

I think it might have something to do with the fact that I'm using InnoDB databases.

I wonder if there's a way to start mysqld on boot-up with the appropriate options?

I guess I'll have to look at innodb.com and find out if I need to start it differently.

I never had this problem with InnoDB files with windoz.

What do you think?


tgus

____________________________
Families can be together forever...
 
Hi all,

This isn't a dead issue yet.

Some of the people in the MySQL forum are still trying to help too.

To keep up with what's happening over there follow the thread link in the first post here.

I'm watching both threads, trying to resolve this. I only posted here because after trying a number of things. They suggested I repost here in the Linux Server forum.

Thanks for helping. We'll get this working yet.


tgus

____________________________
Families can be together forever...
 
Can you post the mysql.server file here...
or
Look in the script to see where it starts the server and add -u root to it.

I am thinking you need to login as root in order to get it started and the script doesn't log in as root.



 
Running any daemon that interacts with users as root is a bad idea in my opinion.

//Daniel
 
Look here; Thread436-530321 for the answer

Thanks for helping!

tgus

____________________________
Families can be together forever...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top