Moving MySQL to an external SSD on OSX

Has anyone moved a MySQL DB files to an external SSD?

I’m working on a Web app that uses a MySQL DB, the db is around 8GB in size so I’m not looking forward to uploading the db to a cloud server just yet, not to mention it’s still a dev db. I would like to be able to move the db off my laptop’s SSD into an external drive.

I’m thinking I can copy the MySQL files to the external drive and then simply point at them using Preferences -> MySQL -> Configuration

Anybody thinks it’s possible or it’s defenitely a no go? I don’t want to spend time monkeying around with this if it’s a silly idea. Any thoughts?

If you clone it to the external and then change settings you should be able to test whether that works or not

Seems like that’d be plausible to me

Having a vote of confidence on the theory I’ll give it a try.

It just seems too easy to be true. I was reading about how to do it using the terminal and I got a headache.

instead of moving, do a db backup and restore to the external. Also, things to keep in mind that with db’s, there is ALOT of read / write operations In which you need to make sure the external can handle the I/O other wise you could end up with corruption and or dead external drive.

True…

I’ll look into some not hyperexpensive RAID options.

This shouldn’t be an issue for a development db, unless you’re letting a lot of users access it for testing.

depends on what the application does. For example, I have apps that are heavily db dependent that will crawl through storage and perform insert / update / query operations. One test dataset that I have contains 50 million file objects.

The db is dev only, although at some point I will need to test a process that updates close to 100 million records.

Doing some googling I found this link:

https://superuser.com/questions/1481848/move-mysql-databases-to-external-drive-on-mac-os-dealing-with-the-absence-of-my

Seems it worked for this guy :slight_smile: