MySQL Forums
Forum List  »  Newbie

Re: How can I move a MySQL database to another drive?
Posted by: Shawn Green
Date: May 21, 2021 01:09PM

While what Peter says in the other thread is absolutely accurate (--datadir only accepts one folder as a parameter), you can (if you are using a new enough MySQL) create general tablespaces in any _permitted_ folder. Then you can designate multiple tables to live within that tablespace by how you define those tables.

Please review: https://dev.mysql.com/doc/refman/8.0/en/general-tablespaces.html

But, as Peter also said, the easier solution is to just create a new folder to act as your --datadir location on your D: drive, stop mysqld, copy ALL the files and subfolders from the old folder to the new one, edit your my.ini to change the --datadir setting, then restart mysqld.

Shawn Green
MySQL Support Manager

Options: ReplyQuote


Subject
Written By
Posted
Re: How can I move a MySQL database to another drive?
May 21, 2021 01:09PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.