Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8348789
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T07:47:44+00:00 2026-06-09T07:47:44+00:00

I have a large mySQL database that I backup each night via a cron

  • 0

I have a large mySQL database that I backup each night via a cron job:

/usr/bin/mysqldump --opt USERNAME -e -h SERVERNAME -uUSER -pPASSWORD > /home/DIRECTORY/backup.sql

It is working well – except when I go to ‘restore’ the sql file on another server – it takes a long time (about 3 mins)

This is in contrast to using phpMyAdmin – if I do “export” and export the same mySQL database, then import that sql file into another server it only takes 10 seconds.

Question: how do I make “mysqldump” create the same type of sql file that “phpMyAdmin” does?

Example of some FAST version sql (not all of it):

CREATE TABLE IF NOT EXISTS `absence_type` (
  `absence_type_ID` int(16) NOT NULL AUTO_INCREMENT,
  `name` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`absence_type_ID`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=14 ;

--
-- Dumping data for table `absence_type`
--

INSERT INTO `absence_type` (`absence_type_ID`, `name`) VALUES
(1, 'Sick Leave'),
(2, 'Personal Carers'),
(3, 'Other');

Example of some SLOW version sql (not all of it):

        --
    -- Table structure for table `absence_type`
    --

    DROP TABLE IF EXISTS `absence_type`;
    /*!40101 SET @saved_cs_client     = @@character_set_client */;
    /*!40101 SET character_set_client = utf8 */;
    CREATE TABLE `absence_type` (
      `absence_type_ID` int(16) NOT NULL AUTO_INCREMENT,
      `name` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
      PRIMARY KEY (`absence_type_ID`)
    ) ENGINE=MyISAM AUTO_INCREMENT=14 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
    /*!40101 SET character_set_client = @saved_cs_client */;

    --
    -- Dumping data for table `absence_type`
    --

    LOCK TABLES `absence_type` WRITE;
    /*!40000 ALTER TABLE `absence_type` DISABLE KEYS */;
    INSERT INTO `absence_type` VALUES
 (1,'Sick Leave'),
 (2,'Personal Carers'),
 (3,'Other');
    /*!40000 ALTER TABLE `absence_type` ENABLE KEYS */;
    UNLOCK TABLES;
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T07:47:51+00:00Added an answer on June 9, 2026 at 7:47 am

    From my comments…

    Likely the options between mysqldump and PHPMyAdmin export don’t match. For example, inclusion of DROP TABLE, extended INSERT, etc.

    I suggest comparing the two files. I’m sure there is something obvious. Then either adjust the options for mysqldump or in PHPMyAdmin. Either should work as the latter uses mysqldump underneath.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If I have large articles that need to be stored in a database, each
I have a MySQL database that contains a large number of polygons, one for
I have quite a large and complex table in a MySQL database that would
i have a large mysql database table in which one column contains values ranging
I have a large database in MySQL and it is about 4 Gb, still
I have a MySQL database with a fairly large table where the products are.
I have a Python program that executes a large MySQL statement. How do I
i have a large MYSQL database with hundreds of thousands of records. i want
I have a large mysql table that I think might be using the wrong
I have got a requirement that mysql database can only be accessed from localhost.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.