LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-31-2001, 10:13 AM   #16
felecha
LQ Newbie
 
Registered: May 2001
Posts: 20

Original Poster
Rep: Reputation: 0

OK, I posted a shortie over there since it seemed pertinent.

I did man cron and followed the clues to /var/spool/cron, which was empty, so I hope that is not what the problem is.

I don't know how to do the links to rc3.d and all that stuff. Can you teach me?

I copied my_medium.cnf to /etc and renamed it my.cnf, and commented out all my attempts in /root/.bash_profile to start the daemon that way. I also copied mysql.server to /etc/rc.c/init.d., thinking that's some sort of directory that runs stuff at startup. On login I got no messages, but there was no daemon when I ran ps -ax.
I tried to run mysqladmin from the prompt and was told

error: found option without preceding group in config file: /etc/my.cnf at line: 20

looks like line 20 is

PATH = /sbin:/usr/sbin:/bin:/usr/bin

I tried appending the path to mysqladmin,

:/usr/local/mysql/bin

but got the same error.

So if I'm following all this, a call to mysqladmin or mysql calls up mysql.server if the daemon is not already running? And then mysql.server checks with /etc/my.cnf for any config stuff, then it calls mysqld with whatever it got from my.cnf?

So, what is the missing preceding group in line 20?

This is a target-rich environment for sure. Thank you all so much

F
 
Old 05-31-2001, 11:23 AM   #17
felecha
LQ Newbie
 
Registered: May 2001
Posts: 20

Original Poster
Rep: Reputation: 0
I copied my_medium.cnf to /etc and renamed it my.cnf. I also copied mysql.server to /etc/rc.d/init.d.. And I commented out all the lines I put into root/.bash_profile to start the daemon other ways.

When I rebooted and logged in, there were no messages on the login screen, and the daemon was not running.

When I ran mysqladmin at the prompt, I got

error: options found without preceding group in config files: at line 20

line 20 of my.conf is

PATH = /sbin:/usr/sbin:/bin:/usr/bin

I appended the path to the mysqladmin directory, thinking maybe that's wjat it wanted

:/usr/local/mysql/bin

but no luck.

Running good old mysql got the same error.

I see the thing in doodah's post about the links but I don't know how to do that. Can yuou teach me?

This is a target rich environment. Thanks so much

F
 
Old 05-31-2001, 01:26 PM   #18
felecha
LQ Newbie
 
Registered: May 2001
Posts: 20

Original Poster
Rep: Reputation: 0
sorry for the double post. I'm new and didn't know about going on to a second page. I posted the one above, then came back later and it didn't show. So I tried to remember what I had said and reposted it.
 
Old 05-31-2001, 01:43 PM   #19
doodah
Member
 
Registered: Apr 2001
Location: Columbus,OH
Distribution: slackware
Posts: 122

Rep: Reputation: 15
Quote:
So if I'm following all this, a call to mysqladmin or mysql calls up mysql.server if the daemon is not already running? And then mysql.server checks with /etc/my.cnf for any config stuff, then it calls mysqld with whatever it got from my.cnf?
close...
mysql.server --> safe_mysqld --> mysqld

mysql.server reads my.cnf(if it is there) and passes args to safe, safe then passes those args, or default args, to mysqld... mysql is just the client...

to set it up...
what you need to do is copy the mysql.server to the /etc/init.d with just a $ cp .....
then cd to the /etc/init.d and type...

$ ln -s mysql.server /etc/rc3.d/S99mysql

the S has to be there cuz the script that will start this looks for a 'S' prefix in all the rc*.d's file..

then still in the same dir do a

$ ln -s mysql.server /etc/rc0.d/S01mysql

this should get them starting and stopping.... if you look in the /etc/my.cnf file there is a entry to set the path for the socket file... the socket should remain at a constant place... my box has the socket in temp, not by choice, but because of PHP, and Perl... so you can use the my.cnf to put the .sock where ever you want, but other apps may need to find that sock and they may look in other places... I would not suggest copying the socket back and forth... just try to get everything configed correctly....

oh yeh make sure your new my.cnf file is pointing at the correct data dir that contains all your tables.. i dont worry about the line about ....
mysql-data-dir/my.cnf
i think that would be for having multiple servers on the same machine
 
Old 05-31-2001, 02:38 PM   #20
felecha
LQ Newbie
 
Registered: May 2001
Posts: 20

Original Poster
Rep: Reputation: 0
Well, it seems there is not just one way for MySQL to set itself up.

I set up the links, and they appeared in rc3.d and rc0.d They appear in red, by the way, both in File Manager in the GUI and in the terminal. Mean anything? I've seen links as light blue before. Both S01mysql and S99mysql show like that.

Also, my RedHat 7.0 has init.d as

/etc/rc.d/init.d, not /etc/init.d.

Difference between RH and Mandrake?

Anyway, the daemon still did not come up. When I ran mysqladmin, I again got the error

Found options without preceding group in config file: /etc/m.conf at line 20

Any ideas?

5 minutes later, after playing with some ideas:

If I have my.cnf in /etc, I get the "Found options" error. If I change the file name, so it's "not there", the daemon starts and immediately stops -- "mysql ended". With my.cnf still "hidden" if I run "mysql.server start", the daemon starts and stays.

So if I follow your post, if there's no my.cnf to check, mysql.server passes default args to safe_mysqld. If I just call safe_mysqld, it can't start the daemon without whatever mysql.server passed to it.

So for now, it seems the thing to do until I figure out more, is go back to putting the line in .bach profile to run ,mysql.server without the my.cnf file there. Or actually, just leaving it as is, in init.d without my.cnf would still do it.

Back to a reboot to try, and I'll post this before I do. One thing I miss in Linux is the ability to cut and paste into browser boxes. In Windows I would just copy this out to Notepad and save it, then do my test, then come back and pasted it back into the message window.
 
Old 05-31-2001, 02:55 PM   #21
felecha
LQ Newbie
 
Registered: May 2001
Posts: 20

Original Poster
Rep: Reputation: 0
Nope.

Didn't start with just mysql.server in /etc/rc.d/init.d. Putting a line in /root/.bash_profile

/usr/local/mysql/support-files/mysql.server start

does start the daemon, and I can start up MySQL with

mysql -u root -p

Maybe mysql.server needs "start" added? I was guessing that its presence in a certain directory would somehow give it the "start" argument.

Anyway, I can now at least use MySQL and maybe do some work on the school project I left aside so long ago. Still, I really hope to find out what's going on here. This is such good learning. I do hope to get a job someday, and this will be more under my belt. Why is learning so often this way, though? Even in school, with a curriculum and teachers, so much of it involves getting into a black hole and trying to get out. Can't tell you how many times I've gotten help from a forum. I'm new on this one, and glad to have found it.

F
 
Old 05-31-2001, 04:23 PM   #22
doodah
Member
 
Registered: Apr 2001
Location: Columbus,OH
Distribution: slackware
Posts: 122

Rep: Reputation: 15
hmmm...

only thing i can think would be try all the steps again only when you copy msql.server to init.d, rename it mysql,

if that doesnt work, edit that file and make sure it is pointing to the correct data dir in the script... you shouldnt have to edit this, but i edited mine and it works so you may want to try it.... they will be right at the top under-

#Set some defaults
 
Old 06-01-2001, 04:17 AM   #23
felecha
LQ Newbie
 
Registered: May 2001
Posts: 20

Original Poster
Rep: Reputation: 0
Defaults has data directory OK.

In any case, I seem to have a dependable way to get it up and running, and I've now seen lots of documentation that I can enjoy digging into some more, and maybe I'll learn the answer some day.

Doodah, thanks a lot.

F
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
can we uninstall linux nagu_linux Linux - Newbie 2 12-26-2004 12:22 AM
how do I uninstall linux lisbet Linux - Software 11 11-08-2004 08:49 PM
Source uninstall with 'make uninstall' HOWTO! Creeps Linux - Newbie 6 09-14-2004 11:03 AM
Uninstall Linux Liquid_Snake Linux - Software 7 07-10-2003 09:51 PM
How do you uninstall Linux? Typhonian Linux - General 4 04-12-2003 03:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration