LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
LinkBack Search this Thread
Old 02-09-2012, 03:51 PM   #1
PlymWS
Member
 
Registered: Aug 2006
Posts: 48

Rep: Reputation: 15
Setup second MySQL server


I'm trying to setup a second MySQL server on my CentOS 5.7 box. I've followed several Google results which all have you make a data directory and populate it from the command line. I've also made a my2.cnf file with the startup variables in.

The problem comes when I try and start the service. I copied the /etc/rc.d/init.d/mysqld file to mysqld2 and edited the values to point to the new data directory, pid file etc but if I run service mysqld2 start it starts the original server and not the new one.

I can start the second server from the command line but I would like to be able to start it as a service and have it automatically start on boot up.

Is there anything obvious I may have missed or any hints why the second init file doesn't pass the second cnf file when run ?
 
Old 02-09-2012, 04:17 PM   #2
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
Hi,

maybe you need init script to start/run it:
- daemon init scripts
- linux init scripts
- register script with chkconfig

I haven't done anything like it, just remembered it, so I wrote you maybe it helps.

good luck
 
Old 02-10-2012, 05:26 AM   #3
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6
Posts: 1,244

Rep: Reputation: 394Reputation: 394Reputation: 394Reputation: 394
Check that youe /etc/rc.d/init.d/mysqld2 script has been edited to ensure that the second config file is being used.

There isn't a specific reference to my.cnf in the default file so you'll have to add the relevant section to the start) block yourself.
 
  


Reply

Tags
centos, multiple, mysql


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL setup without "mysql.server" in CentOS5 Ericxx Linux - Server 3 07-16-2010 02:51 AM
Fedora perfect setup server and MySql sneaky Linux - Newbie 1 08-27-2008 10:21 AM
Suggested server setup for a small business + mysql question eaglestrike7339 Linux - Server 1 09-12-2007 04:51 PM
PHP/MySQL and Apache server setup nenyo Linux - Software 7 02-12-2005 01:48 PM


All times are GMT -5. The time now is 03:16 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration