Clone MySQL database

前端 未结 7 787
攒了一身酷
攒了一身酷 2020-12-12 13:37

I have database on a server with 120 tables.

I want to clone the whole database with a new db name and the copied data.

Is there an efficient way to do this?

相关标签:
7条回答
  • 2020-12-12 14:38

    In case you use phpMyAdmin

    1. Select the database you wish to copy (by clicking on the database from the phpMyAdmin home screen).
    2. Once inside the database, select the Operations tab.
    3. Scroll down to the section where it says "Copy database to:"
    4. Type in the name of the new database.
    5. Select "structure and data" to copy everything. Alternately, you can select "Structure only" if you want the columns but not the data.
    6. Check the box "CREATE DATABASE before copying" to create a new database.
    7. Check the box "Add AUTO_INCREMENT value."
    8. Click on the Go button to proceed.
    0 讨论(0)
提交回复
热议问题