0

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.

Logica
  • 977
  • 4
  • 16
smacz
  • 46
  • 3
  • 1
    _"If the server is running the database is stored in memory"_ No it's not. Maybe parts of it, or maybe if you have a very small database. But imagine a multi TB database; how do you suppose that is all stored in memory? Besides; MySQL could, potentially, be writing to disk continually. What are you trying to accomplish? Because what you're doing now is begging for corrupt a corrupt (copy of) your database. _"Any type of snapshot, AWS, DigitalOcean, Azure, is worthless without this figured out."_ That's NOT how snapshots work. – RobIII Apr 06 '20 at 08:11
  • "mysqldump points to a new file"...why is that a problem, if you just want to copy it to another server? – ADyson Apr 06 '20 at 08:33
  • Maybe you should look into replication? HA cluster? – RobIII Apr 06 '20 at 10:08

0 Answers0