The same way you create the Mysql tmp directory in the first place.
the only change is to mount it as tmpfs. You will also have to add it to the /etc/fstab to get it mounted on boot.
The major problem is that tmpfs by default can take half your memory. So if you have a large database you also will need a large swap - though you can start small, and expand. You do run the risk of page fault storms as the database itself will be page faulting data in/out, as well as the tmpfs.
|