0

I have a question tmpfs. I would like to use it for mysql tmp. My question is next:

If my server crash, data in /tmp are deleted (it's the tmpfs rule) so mysql cache tables are deleted.

So, if my server crash, data are saved or I loose all data don't put in the mysql basedir ?

Sorry if my question is weak ;)

Thanks

0

Unless you design a mechanism to save the data to disk, any changes will be lost. A wrapper script in init would be a good starting point.

It's important to realize that it's difficult to use a mechanism like this and design it to be infallible. If the server suffered a total crash or complete loss of power, you would have data loss. You would have to design your backups to compensate for this and decide what level of risk you are comfortable with.

I would probably have a replication slave writing to disk as a means to have a copy of the data in case of failure.

Related questions:

Edit

I read too quickly, I thought you were talking about storing the database in tmpfs. pjz's answer covers storing MySQL temporary data on a tmpfs /tmp filesystem. It's okay unless you replicate.

3

According to the mysql docs, your data should be fine unless you're running a replication slave.

0

mysql tmpfs

I have very small mysql DB around 4GB above link is really help try out

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.