Wednesday, 25 July 2018

MySQL: Copy Database From One Server to Another Server (Using mysqldump)

In this post, I am sharing different types of options to copy your MySQL Database from one server to another server.
The migration of data, objects or database is a ubiquitous task for any DBA so as a blogger I can’t skip this kind of topics.
Common and General option:
Server 1: Take the backup in .sql file
– -databases option adds the CREATE DATABASE in dump file, so that you can restore same backup in any other server without creating a blank database.
Next, copy mydump.sql file from Server 1 to Server 2.
Server 2: Restore the backup
My favourite option:
Use pipe and copy the database from one server to another, without taking or moving the physical file.
For all database:

0 comments:

Post a Comment