Host MySQL on a shared folder

2.8k views Asked by At

I am trying to host MySQL Database on the shared location of the organization. Is there any way through which I can achieve this because I don't have a shared server which will run all the time.

2

There are 2 answers

0
Gord Thompson On BEST ANSWER

MySQL is a "client-server" database management system (like Microsoft SQL Server, PostgreSQL, Oracle, etc.) so it requires a server on which the centralized database management application (the "database server") can run. The client software for such databases can only "talk to" the application running on the server, and the server application updates the database file(s); the clients cannot update the database file(s) directly.

By contrast, a "peer-to-peer" (sometimes called a "shared-file") database like Microsoft Access does not have a centralized database application. Instead, each client machine has a copy of the database engine that can update the database file(s) directly in a co-operative fashion.

So, you cannot use MySQL without having a MySQL database server running somewhere. As for a peer-to-peer solution, refer to your previous question here.

0
Elemental On

While I understand what you are doing it is simply a very bad idea and cannot be made to work. Much of the purpose of a DBMS system (like mySQL) is to handle concurrent access to the data responsibly.

The basic idea of the architecture is to talk (in small messages) to a server software stack that can rapidly access its files and grab the data you need and send it back to you. This server software stack does two things:

  1. Negotiates that clients looking at the same data all see a consistent meaningful picture of the data
  2. Does all the searching, sorting, indexing etc on the server without sending all this data back and forth across the network.

So if you are using MySQL shared between different client machines you need to have the mysql server running ONCE on the server (as opposed to running on each client accessing a shared drive as you suggest).