LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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
 
Search this Thread
Old 03-02-2008, 09:23 PM   #1
lukebeales
Member
 
Registered: Oct 2003
Location: Australia
Distribution: Slackware/LFS/Ubuntu
Posts: 89

Rep: Reputation: 15
Multiple MySQL servers using same mounted data?


Hi all,
I'm in a situation where I have a web interface which relies on a database backend. It would be easier for me if the interface just pointed to 127.0.0.1 for the database which means every server needs to have an instance of mysql running. The catch is they all need to run with exactly the same data in real time, and they will be changing different rows/etc of the same tables sometimes at the same time.


So if I was to mount the physical database files (stored on a single main server) in the same place on every mysql server, would there be any locking issues between the mysql nodes arguing for control, or does mysql handle this type of scenario well? Anyone have any experience in this? Any ideas would be greatly appreciated as it would take some considerable time to set a test environment up.

Thanks for any info.
 
Old 03-02-2008, 09:38 PM   #2
JWPurple
Member
 
Registered: Feb 2008
Posts: 67

Rep: Reputation: 17
A classically bad idea. NFS locking may be better than it was in classic times, but I wouldn't chance this.

In addition, your scheme means doing admin work on multiple instances which means a lot of work at patch-time.

The web interface doesn't connect directly to the database backend - it uses a client that connects to the backend. Why is it easier to set up n instances, each of which has to have a client than it is to configure n clients to connect to one instance?

Last edited by JWPurple; 03-02-2008 at 09:42 PM. Reason: stuff
 
Old 03-02-2008, 09:48 PM   #3
lukebeales
Member
 
Registered: Oct 2003
Location: Australia
Distribution: Slackware/LFS/Ubuntu
Posts: 89

Original Poster
Rep: Reputation: 15
Thanks for that, that's what I was thinking. It would make backups and configuration and such many times easier if the database location never changed but it was worth a shot!

The reason it is needed is that the interface can stay unchanged whether it was hosted on the local network or deployed elsewhere - it would always look to the local database. But I can write a workaround for it I guess. Thanks again!
 
Old 03-02-2008, 11:33 PM   #4
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,226

Rep: Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022
The usual way is to have a dedicated MySQL server, then all 'clients' local or remote point to the same 'remote' IP Addr.
Rememner, just because the 'client' is on the same machine as the 'server' doesn't mean it has to use 127.0.0.1.
That's the beauty of transparent networking.
 
Old 03-03-2008, 01:57 PM   #5
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 197Reputation: 197
Sounds to me like you just need to setup either a cluster of MySQL servers or just have the Master/Slave type setup.
 
  


Reply

Tags
mount, mysql, network


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
Selecting data from multiple mysql tables derzok Programming 3 10-14-2007 07:00 AM
Multiple MySQL Servers jerryau Linux - Software 2 06-01-2006 12:55 AM
fc5 multiple MySQL servers jerryau Linux - Software 3 06-01-2006 12:38 AM
multiple mysql servers on 1 server stoffell Debian 1 03-01-2005 07:28 AM


All times are GMT -5. The time now is 02:46 PM.

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