#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2013
    Posts
    7
    Rep Power
    0

    MySql Dump very small file


    Hi members

    When i export using phpadmin, the exported file eg 4thMay13.sql.zip is about 500k containing the full database i wanted to export.

    But when i use mysqldump, the size of the file is tiny, only 798 byte; it's content is posted below
    I use mysqldump -u root -p MyDB > mydbbak.sql

    In short mysqldump DID not export the database while phpadmin die - all this is happening in wamp at the localhost.
    The mysqldump.exe is found in c:\wamp\bin\mysql\mysql5.5.24\binmysqldump.exe size: 4,081,152

    I am new here, your site looks very informative and comprehensive & easy to operate. Look forward to your help.


    -- MySQL dump 10.13 Distrib 5.5.24, for Win32 (x86)
    -- Host: localhost Database: MyDB
    -- Server version 5.5.24

    /*!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 */;
  2. #2
  3. No Profile Picture
    Problem Solver
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jan 2001
    Location
    Stockholm, Sweden
    Posts
    4,495
    Rep Power
    534
    1.
    Are you sure you wrote the correct database name?
    It looks like it would if you are dumping an empty database that doesn't contain any tables.

    2.
    Although I don't know why you would have such odd settings, but just to make sure, run "mysqldump --help" and check the variables section at the end. The values of these control the behavior of the mysqldump and the ones that you should check are:
    Code:
    no-create-db                      FALSE
    no-create-info                    FALSE
    no-data                           FALSE
    /Stefan
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2013
    Posts
    7
    Rep Power
    0
    Thanks Stefan
    I will check if i got the database name wrong plus tinker with --help

    PS Following your hint, just found something odd.

    If the database name is a straight eg Jm1db, the whole db is exported.
    However if the file name is Jm_db, the same problem occurred. This is reconfirmed after renaming jm_db to jm2db, dump works fine.

    FINAL FINDING
    After checking, repairing & optimizing all tables at phpMyAdmin, the rogue database with the underscore can also be fully exported.

    Happy at last, thanks for the push

IMN logo majestic logo threadwatch logo seochat tools logo