Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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.
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.
Did you run a diff on the scripts to make sure they are the same...
diff didn't output anything, so I'm guessing they're the same:
Code:
# diff /etc/rc2.d/S19mysql /etc/rc3.d/S19mysql
#
Quote:
Originally Posted by Wim Sturkenboom
...a space or <tab> that you don't see can already be a pain.
Which is why I'm not a coder. Kudos to those who are. The extent of my hacking: Off The Mark cartoon.
Quote:
Originally Posted by Wim Sturkenboom
And the problem is probably just before line 132; maybe a missing semicolon?
Since I'm not proficient in coding (scripts), I just attached the script file so those who know can check it. If someone patches it, just attached the fixed S19mysql to your reply, please. Thanks.
case "${1:-''}" in
'start')
sanity_checks;
# Start daemon
log_daemon_msg "Starting MySQL database server" "mysqld"
if mysqld_status check_alive nowarn; then
log_progress_msg "already running"
log_end_msg 0
else
/usr/local/mysql/bin/mysqld_safe > /dev/null 2>&1 &
# 6s was reported in #352070 to be too few when using ndbcluster
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14; do
sleep 1
if mysqld_status check_alive nowarn ; then break; fi
log_progress_msg "."
done
if mysqld_status check_alive warn; then
log_end_msg 0
# Now start mysqlcheck or whatever the admin wants.
output=$(/var/mysql/mysql-start)
[ -n "$output" ] && log_action_msg "$output"
else
log_end_msg 1
log_failure_msg "Please take a look at the syslog"
fi
fi
# Some warnings
# if $MYADMIN variables | egrep -q have_bdb.*YES; then
# echo "BerkeleyDB is obsolete, see /usr/share/doc/mysql-server-5.0/README.Debian.gz" | $ERR_LOGGER -p daemon.info
# fi
# if [ -f /etc/mysql/debian-log-rotate.conf ]; then
# echo "/etc/mysql/debian-log-rotate.conf is obsolete, see /usr/share/doc/mysql-server-5.0/NEWS.Debian.gz" | $ERR_LOGGER -p daemon.info
# fi
# ;;
'stop')
I think you're problem will be solved by removing the # in the line that I marked in bold red
If you look at all the other options (stop, restart, ...), they are terminated by a double semicolon before the next option. But for the start one that double semicolon is commented out.
Keeps the question why the other runlevels don't complain (unless you have not actually tried them)
I think you're problem will be solved by removing the # in the line that I marked in bold red
Thaaaat didn't work. The resulting error(s) made me laugh, as it reminded me of my website's 404 page.
Code:
/etc/rc2.d/S19mysql: WARNING: /etc/init/my.cnf cannot be read. Blame LOLcat (warning).
Starting MySQL database server: mysqld . . . . . failed!
Quote:
Originally Posted by Wim Sturkenboom
If you look at all the other options (stop, restart, ...), they are terminated by a double semicolon before the next option. But for the start one that double semicolon is commented out.
I actually put the ;; below the 2nd fi at the end of the 'start') section. Same result, but seemed like better form. Interestingly, the 'stop') section ends in a double fi without the ;; too, yet no complaints. *shrug*
Quote:
Originally Posted by Wim Sturkenboom
Keeps the question why the other runlevels don't complain (unless you have not actually tried them)
Shhh...I'm just glad my server runs, regardless of whichever runlevel it choses, since it's my first foray into Linux. FWIW, I just noticed that during shutdown, it gives the same error regarding /etc/rc0.d/K21mysql, which is identical to S19mysql.
Last edited by DJRcomputing; 05-24-2011 at 07:13 AM.
I actually put the ;; below the 2nd fi at the end of the 'start') section. Same result, but seemed like better form. Interestingly, the 'stop') section ends in a double fi without the ;; too, yet no complaints. *shrug*
*sigh* Thank you for carefully reading my previous reply:
Quote:
Originally Posted by DJRcomputing
Thaaaat didn't work. The resulting error(s) made me laugh, as it reminded me of my website's 404 page.
However,
Quote:
Originally Posted by Wim Sturkenboom
I've stripped all the stuff out so you can see the frame work of the case and the difference between the start section and the others.
Don't care about number of fi's unless you start counting the if's as well
I appreciate you pointing out my oversight. I thought the 'stop') case ended @ line 154, and not 163, as if a new case invisibly started at 156. Whoops. LOL!
I've also learned that /etc/rc#.d/###mysql are just symlinks to /etc/init.d/mysql for the different runlevels, so of course they're all the same. Duh...
Finally, I asked my father, who's a proficient coder, and he recommended the same thing you did. I guess I'll just live with the benign "splinter" (ie: annoying) syntax error, which beats failed! any day.
In the end, I consider this resolved, unless anyone has the "solution", but not [SOLVED]. However, it's not worth any more of my time. I'm still going to report the bug, so their devs look into their own coding.
Oooookay?! The problem just...fixed itself? The error went away...on it's own? Just...disappeared? Even the runlevel symlinks are gone. *boggles* I didn't delete it/them. mysql.server is there, but...
The MySQL daemon loads like it always has, which I thought was tied into /etc/init.d/mysql, as an executable copy of mysql.server...so how was /etc/init.d/mysql different, and where'd IT come from?? I'm so confused. I could rename mysql.server to mysql & the ###mysql.server symlinks to ###mysql, but I'm leaving this $h!+ alone & marking this b!+ch [SOLVED] while I can. I get that my server is "possessed" by daemons & all, but...???
Then again, it could be my cats. *shrug* (Malicious li'l hackers.) Maybe they were trying to help me out for a change (doubtful). They do, after all, like playing with mice...
Last edited by DJRcomputing; 05-29-2011 at 08:25 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.