DigitalBerg
  • HOME
  • WINDOWS VPS
  • VIRTUAL SERVER
    • Virtuozzo VPS
    • OpenStack VPS
    • Amazon Lightsail VPS
    • VMware VPS
  • DEDICATED SERVER
    • INSTAND DEDICATED SERVERS
    • HOSTING DEDICATED SERVERS
    • DEDICATED ENTERPRISE SERVERS
    • INFRA. DEDICATED SERVERS
    • DEDICATED GAME SERVERS
  • MORE
    • SSL SHOP
    • FREE SSD WEBHOSTING
  • LOGIN
  • Click to open the search input field Click to open the search input field Search
  • Menu Menu

We talking about Cloud

Web Hosting & Cloud Services
Celebrate the power and freedom of Open Source
with Open Source Cloud Servers starting at only £10/mo £5/mo.

Copy a Database in phpMyAdmin: 7 Easy Steps

You can copy a database in phpMyAdmin to create a separate version for testing, development or a website migration. Choose Structure and data to duplicate the tables and their contents, or Structure only to create empty tables.

Before starting, check the destination database carefully. On cPanel hosting, create it through cPanel first so the control panel can track it correctly for account management and backups.

On This Page

  1. Back up the source database
  2. Create the destination database
  3. Open phpMyAdmin
  4. Choose the copy settings
  5. Run the copy
  6. Verify the result
  7. Connect your application

1. Back Up the Source Database

Take a database backup before making changes. Use your hosting backup tools or export the source database as an SQL file.

Keep the backup somewhere secure outside your website’s public directory. Database exports may contain customer information, password hashes and other private data.

If the application is actively saving orders, bookings or messages, plan a quiet period or use an application-supported backup process. A copy made while data changes may not represent one consistent point in time.

2. Create an Empty Destination Database

For cPanel accounts:

  1. Open Databases → Manage My Databases. Older interfaces may call this MySQL Databases.
  2. Create a new database with a recognisable name.
  3. Record its complete name, including any account prefix.
  4. Create or assign a database user with the permissions your application requires.

For example:

Source database: account_website
Destination database: account_staging

These names are illustrative.

Do not create the destination database directly in phpMyAdmin on cPanel. cPanel recommends using its database-management tools so the database is mapped to the account correctly.

See cPanel’s database-management documentation.

For Plesk, create the destination through its Databases section, or use its database-copy feature where available. The options depend on your hosting permissions.

3. Open the Source Database in phpMyAdmin

Launch phpMyAdmin from your hosting control panel.

Select the source database in the left-hand navigation, then open the Operations tab.

Check the database name before continuing. You need the database-level Operations page, rather than the Operations tab for an individual table.

4. Choose the Settings to Copy a Database in phpMyAdmin

Find Copy database to and enter the complete destination database name.

Choose the settings appropriate to your task:

Setting When to use it
Structure and data Copy table definitions and their existing records
Structure only Create the table layout without copying rows
CREATE DATABASE before copying Leave unchecked when the destination was already created through your hosting panel
Add AUTO_INCREMENT value Preserve the current sequence value where supported

Keep the destination empty unless you deliberately intend to merge or replace objects.

Do not enable options that drop existing tables or overwrite data without understanding their effect. Labels and available settings vary between phpMyAdmin versions.

5. Run the Database Copy

Review the source, destination and selected options, then click Go.

Wait for the result before refreshing the page or starting another copy. Repeating the operation can produce conflicts if tables have already been created.

If the interface reports an error, record the message and check the destination before retrying. A failed operation may still have copied some tables.

6. Verify the Copied Database

Refresh the navigation panel and open the destination database.

Check that:

  • The expected tables are present.
  • Important tables contain the expected data.
  • Any required views, triggers, routines or events were included or transferred separately.
  • The database user has the necessary access.
  • The application works when connected to the copy.

Table counts and displayed sizes are useful checks, but they do not prove that a copy is complete. Some phpMyAdmin statistics may also be cached.

For important tables, compare exact row counts where practical. Remember that counts can change if the source application remains active.

7. Connect Your Application to the Copy

Copying a database does not automatically switch a website to it.

Update the test application’s database configuration with the destination database name, username, password and hostname.

For related guidance, see How to Connect to the MySQL Database.

If you are creating a staging website, also review scheduled jobs, outgoing email, payment integrations and external services. A database copy can retain settings that trigger real actions.

Troubleshooting

“Access Denied” or Insufficient Privileges

Confirm that the logged-in account can read the source and create the required objects in the destination. Check the database-user assignments through your hosting control panel.

The Destination Already Contains Tables

Stop and inspect it. Do not delete tables simply to clear an error. Use a new empty database if you are unsure whether the existing data is needed.

The Copy Times Out

Large databases can exceed browser-based processing limits. Ask your provider about a server-side backup and restore or an appropriate command-line method.

Before retrying, check for a partial copy. The phpMyAdmin troubleshooting documentation covers processing and import limits.

The Copy Works, but the Website Still Uses the Original

Check the application’s configuration file or environment variables. Confirm that you edited the correct installation and changed the database connection details.

Frequently Asked Questions

Does Copying a Database Delete the Original?

A copy operation is intended to retain the source database. Make sure you selected Copy, not Move, and review any destructive options before proceeding.

Can I Copy a Database to Another Server?

The Operations workflow generally works within the connected database server and your available permissions. For a different server, use export and import, a hosting migration tool or a provider-assisted transfer.

Does the Copy Include Database Users and Passwords?

Do not assume it does. Database accounts and grants are managed separately from application tables. Create or assign the destination user through your hosting panel.

Is a Database Copy the Same as a Backup?

A copy can help with testing, but it should not replace a separate, recoverable backup. A second database on the same account may be affected by the same account or server problem.

Need Help?

Contact DigitalBerg support with the source and destination database names, approximate database size and any error message.

Do not include database passwords or private customer records.

Get in Touch

Let me know if you got an interesting project and want to work together!

digitalberg.com

DigitalBerg fuels apps, websites, emails, and much more for numerous clients globally.

Virtual servers to dedicated servers at affordable prices that any hostinger student can afford.

Services

  • Web Hosting
  • Virtual Server
  • Instant Servers
  • Dedicated Servers
  • Enterprise Servers
  • Infrastructure Servers
  • Gaming Servers
  • SSL Shop

SUPPORT

  • Contact Us
  • Wiki
  • FAQ
  • Blogs

Company

  • About Us
  • Partners
  • Privacy Policy
  • Term of Service
  • Acceptable Use Policy
  • Green Hosting
  • Data center

CLIENT AREA

  • Registration
  • Client Area
  • Server Status
  • Support

OTHER SERVICES

  • Domain Registration
  • Transfer Domain
  • Add ons / Management
  • SSL Certificates
  • Server Monitoring
  • Server hardware
DigitalBerg review
DigitalBerg review
© Copyright - DigitalBerg | From January 1st 2015, in accordance with the amended Directive 2006/112/EC, prices inclusive of VAT may vary depending on the country of residence of the customer.
  • Link to Facebook
  • Link to X
  • Link to LinkedIn
Link to: How to rename a database in phpMyAdmin Link to: How to rename a database in phpMyAdmin How to rename a database in phpMyAdmin Link to: How to drop tables from a database in phpMyAdmin Link to: How to drop tables from a database in phpMyAdmin How to drop tables from a database in phpMyAdmin
Scroll to top Scroll to top Scroll to top