Transfer to Another Drive - Latest Percona MySQL, Rocky Linux 8.10

Sorry for what is likely going to be a very simple question for most of you. I’m training for a sys admin job and hit a small snag. I’m being tested on training and I have to spin up a LAMP server with a new secondary LVM on Rocky Linux 8. Somewhere along the lines I skipped part of the instructions on the test. The results, unfortunately, are that I need to move a database from the system drive to the secondary LVM.

I can’t seem any instructions that clearly explain how to do it. There are tons of server migration instructions. Anything that can point me in the right direction is greatly appreciated.

Many, many thanks!

Without giving away too much… here’s a high level:

  • Stop mysql (you can’t copy data files while they are active)
  • copy the entire datadir from old to new location
  • ensure directory privs are correct
  • update mysql’s config file to use the new path
  • start mysql

I had to do a little bit of work pointing the new path and privileges. But, it’s up and working. Thanks for giving me that little hint.