LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-17-2006, 09:02 AM   #1
john_d13
Member
 
Registered: Apr 2004
Posts: 34

Rep: Reputation: 15
How to auto start my sql server upon reboot?


yeye its a nub question but ive tried rc.d local and all but it doesent work.

anyone know?
 
Old 01-17-2006, 09:12 AM   #2
chess
Member
 
Registered: Mar 2002
Location: 127.0.0.1
Distribution: Slackware and OpenBSD
Posts: 740

Rep: Reputation: 190Reputation: 190
In Slackware, all the boot init scripts are in /etc/rc.d so just go in there and chmod +x the rc.mysqld script and mysql will start on boot. To start it immediately, just do "/etc/rc.d/rc.mysqld start"
 
Old 01-17-2006, 10:01 AM   #3
dipenchaudhary
Member
 
Registered: Jan 2006
Location: india
Distribution: FEDORA CORE 3
Posts: 103

Rep: Reputation: 15
solution 1:
maybe u can try this command on console
chkconfig mysqld on

solution 2:
or u will have to go init way
go n see if mysqld script is present in
/etc/rc.d/init.d/
if its present which shud be ... then u have to check ur init level in most cases it shud be default to 5 if ur using Xserver .. still check it
by typing

vi /etc/inittab

here u locate this line

id:5:initdefault:

see wot this number is ... and then search for rcX.d directory where X is that number
make a link there to this script in init.d by typing

cd /etc/rc.d/rcX.d
ln -s /etc/rc.d/init.d/mysqld S67mysql

here capital S will make init script to know .. that it has to start this at boot .. and 67 shud work .. i think u can take any number .. it just tells relative position of its start at boot time

solution 3:
u can add this line to rc.local
if ur distro is red hat based then it shud be in /etc/rc.d/rc.local
the line to be added is:

service mysqld start

if nothing works .. post back ... and yehh relative positioning of files may be diff in ur distro ... sont know never used any other linux distro
 
Old 01-17-2006, 10:41 AM   #4
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,272

Rep: Reputation: 154Reputation: 154
dipenchaudhary, Slackware doesn't use the init system you are talking about, what you have said is meaningless on Slackware, I'm afraid. Post 2 outlines the correct procedure.
 
Old 01-17-2006, 11:24 AM   #5
dipenchaudhary
Member
 
Registered: Jan 2006
Location: india
Distribution: FEDORA CORE 3
Posts: 103

Rep: Reputation: 15
hmmm good then ignore everything ...
 
Old 01-17-2006, 01:46 PM   #6
john_d13
Member
 
Registered: Apr 2004
Posts: 34

Original Poster
Rep: Reputation: 15
lol u guys r funny wow 4 replies in 2 hours thats great!

I think I tried taht second post but ill double check then try again and let u know.

cant i just add "/etc/rc.d/rc.mysqld start" to rc.local ?


isint this the file I can just add command lines and they execute on boot?
 
Old 01-17-2006, 02:11 PM   #7
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,272

Rep: Reputation: 154Reputation: 154
Quote:
Originally Posted by john_d13
lol u guys r funny wow 4 replies in 2 hours thats great!

I think I tried taht second post but ill double check then try again and let u know.

cant i just add "/etc/rc.d/rc.mysqld start" to rc.local?
MySQL is started from /etc/rc.d/rc.M, specifically this little block of code
Code:
# Start the MySQL database:
if [ -x /etc/rc.d/rc.mysqld ]; then
  . /etc/rc.d/rc.mysqld start
fi
So adding "/etc/rc.d/rc.mysqld start" to /etc/rc.d/rc.local means the system will try to start mysql twice.

Quote:
Originally Posted by john_d13
isint this the file I can just add command lines and they execute on boot?
This is the file to start additional programs, but not in this case because mysql has its own rc script
 
  


Reply



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
samba auto start on reboot vMatthews Debian 4 11-08-2005 06:40 PM
How do I auto start modules that aren't auto loaded on boot? darkbluedrew Debian 2 09-18-2005 09:10 AM
login regular but start a server process automatically after reboot powah Linux - Newbie 6 05-24-2005 07:21 AM
SSHD Won't Start after Server Reboot Louie55 Linux - Software 2 01-20-2005 08:34 PM
auto start quake 3 server KingMoffa Linux - Games 0 12-05-2003 06:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:08 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