How-to Copy/Duplicate a MySQL Database on Linux-Unix Step-by-Step Easy Guide

May 4th, 2014 by thelinuxevangelist

Copy/Duplicate MySQL Database




The Tutorial Shows You Step-by-Step How-to Easy Copy/Duplicate a MySQL Database on Linux/Unix Systems.

MySQL Copy/Duplicate Database - Featured
  1. Open Command Line Session or Login into Shell

  2. Create a New DB

    mysql -u root -p[pass]
    > CREATE DATABASE mydb2;
    > quit
  3. BackUp Existing DB

    mysqldump -uroot -p[pass] mydb > /home/myuser/mydb.sql
  4. How-to Install Latest MySQL 5.7+ Server on Linux:

    MySQL 5.7.X Quick-Start for Linux
  5. Load BackUp into New DB

    mysql -uroot -p[pass] mydb2 < /home/myuser/mydb.sql

Tags: , , , , , , , , , ,