H
H
homm2011-11-21 08:47:21
MySQL
homm, 2011-11-21 08:47:21

Where and how to store mysql files

We are talking about those files that are actually the base. Typically, a server has a small system drive and a large /home drive. The problem is that, by default, mysql files are stored in /var/lib, which means on the system drive. The /home drive, when it runs out of space, is simply resized to a larger size. You can't do that easily with a system disk, piss. Yes, and somehow this is not correct, the database refers to projects, but is in the system.

Is it possible to store the database on the project disk?
Is it possible to store different databases in different places?
Is it correct?
How it's done?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
@
@mgyk, 2011-11-22
@homm

Can mysql just say that the base is in another directory datadir = /home/mysql

S
Sergey Savostin, 2011-11-21
@savostin

Discover symlink and store it wherever you want. Why create discs?

K
Kirill Mamaev, 2011-11-21
@r00tGER

Let's start with what the server as a whole does in general? What is the most important?
By the way, “The problem is that, by default, mysql files are stored in / var / lib, which means on the system drive.”
/var can actually be at the root, and /var/lib can be mounted anywhere. Even when installing the system, you need to partition and mount points based on the intended functionality of the server.
If its main task is MySQL.
Then, accordingly, all files should be in a safe and “fast” place. Of course, it's better if it's a separate fs, on a separate physical medium (preferably a raid). From here and dance further.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question