MySQL Forums
Forum List  »  Newbie

Migrating MySQL Database to New Server
Posted by: Steve Ungar
Date: September 25, 2024 10:01PM

I have a Windows MyMSQL 5.5 database that I need to migrate to a new server. While I have some knowledge of MySQL it's not extensive so could use some advise on the best way to migrate the data.

The C:\ProgramData\MySQL\MySQL Server 5.5\data directory is about 50GB split across a couple databases, but there’s only a couple GB free on the existing server. Most of the space is from the xxxx.bin.##### files, which I think are the binlog files. I know there are ways to trim these, but I'm new enough that I'm nervous about something not working and everything going kaput.

Couple questions, but open to other better ideas:

- can I install MySQL on the new server, stop MySQL service on both systems, and just copy the entire C:\ProgramData\MySQL\MySQL Server 5.5\data directory to the new server and have it work? If so, do I need to copy the binlog files also or just the database directories?

- looking into whether I can add disk space to the existing server. However, with the databases being big, I haven’t had success with the mysqldump approach. I can dump the data, but when I try to load it back in it errors out after a while, maybe because the file is too big? Are there other export/import options? I'll need other export/import options for other things if there's a better way.

Appreciate the help.

Options: ReplyQuote


Subject
Written By
Posted
Migrating MySQL Database to New Server
September 25, 2024 10:01PM


Sorry, only registered users may post in this forum.

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.