Do quick testing; export a table in PhpMyadmin and with the following command in terminal.
mysqldump -u $UserName -p database table > /tmp/table.sql
Then, open both SQL files with a text-editor; difference should be recognized immediately:
I recognized lots of comments which is exported from PHPMyAdmin and the way of INSERT
ing data. For example:
Exported SQL has the following header:
-- phpMyAdmin SQL Dump
-- version 4.0.10.20
-- https://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Oct 10, 2019 at 03:48 AM
-- Server version: 5.1.73-log
-- PHP Version: 5.3.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
Dumped SQL has the following header:
-- MySQL dump 10.13 Distrib 5.1.73, for redhat-linux-gnu (x86_64)
--
-- Host: localhost Database: testing
-- ------------------------------------------------------
-- Server version 5.1.73-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
compessed
appearing lots of times near the starting of the file (in the larger file it is absent); because both files end with.sql
I didn't imagine one would be compressed. The smaller file has tens ofINSERT
queries while the larger one has hundreds of it which might indicate bulk inserting. – JohnDoea Oct 10 at 9:31mysqldump
as installed by the hosting provider (SiteGround) compresses by default, unlike PHPMyAdmin SQL Dump 4.7.3 that they use as well. – JohnDoea Oct 10 at 9:37