Duplicate a large database on server too big for phpmyadmin

I have a large database and I would like it duplicated to another DB on server. It is too big for phpmyadmin.



  • edited November 2017

    Yes, for PHPMyAdmin it's typically best to only deal with smaller DBs as it is all PHP driven. You can do that from the command line. So we want to create the dump of the DB. Let's make sure there's plenty of space first.

    so to dump the existing database you can use

    mysqldump username_db > /home/username/username_db-dump-2017-11-12.sql

    Then create the new database that you would like to import that into in the cPanel for username_dbtemp and then can import that dump into that database with the mysql command and reverse the less than to pull from that file.

    mysql username_dbtemp < /home/username/username_db-dump-2017-11-12.sql
  • I did a dump of database but can't find it?

  • What user are you using to connect with SSH?

  • That user should be able to view the file without issue. Did you get any output from the mysqldump command?

  • -- Dump completed on 2017-11-12 14:02:08

  • Did you get large amounts of text streaming across the screen?

  • That is an indication that the command wasn't piping to the file. The command that was listed should work just fine.

  • Thanks it worked this time!

Sign In or Register to comment.