LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-23-2008, 12:24 AM   #1
vikram8jp
LQ Newbie
 
Registered: Oct 2008
Location: Tokyo
Distribution: CentOS
Posts: 27

Rep: Reputation: 15
Question How to register MySQL as a service?


Hello all,

I just installed MySQL on my CentOS machine. I need to make the server run at startup. MySQL is not appearing in my init.d services. Can somebody suggest how I can do that? I don't want to put it in rc.local.
 
Old 10-23-2008, 12:44 AM   #2
{BBI}Nexus{BBI}
Senior Member
 
Registered: Jan 2005
Location: Nottingham, UK
Distribution: Mageia 5, Linux Lite
Posts: 4,312

Rep: Reputation: 208Reputation: 208Reputation: 208
It's the mysqld file that gets added to your /etc/init.d directory (usually automatically), if it's not there then you need to locate and read it for instructions on what to do.
 
Old 10-23-2008, 12:56 AM   #3
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
How did you install it? You should have used

yum install mysqld

unless you installed from source

If you did that, and the mysqld file is in /etc/init.t as suggested avove, then

chkconfig --add mysqld (assuming that's the name of the file in /etc/init.d).

Then

chkconfig mysqld

so it start on reboot, and

service mysqld start

to start it now.
 
Old 10-23-2008, 01:10 AM   #4
vikram8jp
LQ Newbie
 
Registered: Oct 2008
Location: Tokyo
Distribution: CentOS
Posts: 27

Original Poster
Rep: Reputation: 15
Thumbs up

Hey guys,

Thanks for your time.

Quote:
How did you install it? You should have used

yum install mysqld
No. I installed it as a part of bundle of Java IDE-Netbeans, Glassfish and MySQL, to be specific.

Thanks anyway. I have solved this problem. I got a startup script of mysql daemon from www.mysql.com and added it myself to /etc/rc.d/init.d under the name mysql.

Then, as billy here suggested

Quote:
chkconfig --add mysqld (assuming that's the name of the file in /etc/init.d).

Then

chkconfig mysqld

so it start on reboot, and

service mysqld start
Fiddling around in Linux is so much fun. I think I am going to get bored of Windows pretty soon.

Last edited by vikram8jp; 10-23-2008 at 01:33 AM.
 
Old 10-23-2008, 01:19 AM   #5
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Glad it worked. Enjoy.
 
  


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
Register a daemon as service bittus Linux - General 6 05-22-2007 10:37 PM
How to register my interrupt service routine with kernel john_crichton Programming 1 04-09-2007 02:39 PM
How do you register Apache as a service on RH 9? Thaidog Linux - Software 1 03-18-2006 07:34 AM
Register rpc service on a remote machine? sokar Programming 1 07-26-2005 06:49 PM
How to register a Tcl script as a service? vlbaranov Linux - Newbie 2 06-01-2004 11:14 AM


All times are GMT -5. The time now is 09:49 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration