Answer the question
In order to leave comments, you need to log in
What exactly does MySQL store in RAM?
In short, I know about caches, buffers, etc. But does the number of databases within a single server affect the size of the occupied memory? The user has root rights, but connects to only one of them. So, for each connection, only info about one database is loaded, right? There are indexes and so on. Others don't.
Therefore, you can create at least a million databases, we will never see out of memory.
I understand correctly?
Answer the question
In order to leave comments, you need to log in
To put it simply, YES.
MySQL stores "frequently used" data in memory (requests and responses for them, indexes for them, etc.) When a process starts, it reserves memory for these purposes (this is defined in the configuration - my.cnf)
If the configuration will allow MySQL to use memory more than there is (physical) + more than SWAP (swap file) - then it is quite likely that you can get = out of memory
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question