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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
|
05-31-2001, 10:13 AM
|
#16
|
LQ Newbie
Registered: May 2001
Posts: 20
Original Poster
Rep:
|
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
|
|
|
05-31-2001, 11:23 AM
|
#17
|
LQ Newbie
Registered: May 2001
Posts: 20
Original Poster
Rep:
|
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
|
|
|
05-31-2001, 01:26 PM
|
#18
|
LQ Newbie
Registered: May 2001
Posts: 20
Original Poster
Rep:
|
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.
|
|
|
05-31-2001, 01:43 PM
|
#19
|
Member
Registered: Apr 2001
Location: Columbus,OH
Distribution: slackware
Posts: 122
Rep:
|
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
|
|
|
05-31-2001, 02:38 PM
|
#20
|
LQ Newbie
Registered: May 2001
Posts: 20
Original Poster
Rep:
|
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.
|
|
|
05-31-2001, 02:55 PM
|
#21
|
LQ Newbie
Registered: May 2001
Posts: 20
Original Poster
Rep:
|
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
|
|
|
05-31-2001, 04:23 PM
|
#22
|
Member
Registered: Apr 2001
Location: Columbus,OH
Distribution: slackware
Posts: 122
Rep:
|
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
|
|
|
06-01-2001, 04:17 AM
|
#23
|
LQ Newbie
Registered: May 2001
Posts: 20
Original Poster
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 02:00 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|