Created
March 9, 2012 11:24
-
-
Save skyrocknroll/2006137 to your computer and use it in GitHub Desktop.
Loading the DB into memory.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Move the data directory to an in-memory filesystem. | |
In Linux, it’s usually in /dev/shm. | |
1. stop the server | |
2. cd /usr/local/mysql | |
3. mv data data1 | |
4. cp -R data1 /dev/shm/data | |
5. ln -s /dev/shm/data /usr/local/mysql/data | |
6. start the server | |
Now the data is in memory, without any limitation. | |
(Warning: the data is in memory only! If your server shuts down, you lose all) | |
When you are finished, copy the data from the in-memory filesystem to the hard disk. | |
Cheers | |
Giuseppe |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment