Migrate MySQL to another partition in same server I have a instance of MySQL in a local server. To improve the performance, I put a SSD just for MySQL.

Now I need migrate the MySQL instance, with my databse (a data has 25GB) for the SSD.

What the best way to do that? 
I thinked in export the data and after reinstall the MySQL in SSD and import the data again. But how is a big database, I will have a large downtime.

Are there a another way?
For linux (as root user)


Stop mysql service through systemctl
rsync or cp -a the whole of /var/lib/mysql to your preferred destination.
mv /var/lib/mysql /var/lib/mysql-old 
edit mysql configuration file and change datadir= under mysqld
Start mysql service through systemctl.