LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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-22-2008, 11:24 PM   #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-22-2008, 11:44 PM   #2
{BBI}Nexus{BBI}
Senior Member
 
Registered: Jan 2005
Location: Nottingham, UK
Distribution: Mageia 6, KDE Neon
Posts: 4,313

Rep: Reputation: 212Reputation: 212Reputation: 212
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-22-2008, 11:56 PM   #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, 12: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 12:33 AM.
 
Old 10-23-2008, 12: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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:28 PM.

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