Without stopping mysql I am trying to copy it to disk and copy that directory over to a new server to use. Apparently FLUSH
and mysqldump
don't work, since mysqldump
points to a new file, and FLUSH
only updates the logfile
files.
Is there any way to dump what is in the mysql database to the filesystem?
From Restoring MySQL database from physical files:
You should be able to restore by copying them in your database folder (In linux, the default location is /var/lib/mysql/)
If the server is running the database is stored in memory. It feels deficient if mysql is inable to flush the memory to disk. Please let me know if this is possible while the mysql server is running.
EDIT: Any type of snapshot, AWS, DigitalOcean, Azure, is worthless without this figured out.