Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 03-02-2008, 10:23 PM   #1
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 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, 10:38 PM   #2
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 10:42 PM. Reason: stuff
Old 03-02-2008, 10:48 PM   #3
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-03-2008, 12:33 AM   #4
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,418

Rep: Reputation: 2398Reputation: 2398Reputation: 2398Reputation: 2398Reputation: 2398Reputation: 2398Reputation: 2398Reputation: 2398Reputation: 2398Reputation: 2398Reputation: 2398
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
That's the beauty of transparent networking.
Old 03-03-2008, 02:57 PM   #5
LQ Guru
Registered: Jan 2001
Posts: 24,149

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


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 08:00 AM
Multiple MySQL Servers jerryau Linux - Software 2 06-01-2006 01:55 AM
fc5 multiple MySQL servers jerryau Linux - Software 3 06-01-2006 01:38 AM
multiple mysql servers on 1 server stoffell Debian 1 03-01-2005 08:28 AM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:29 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration