June 19th, 2013, 12:57 AM
MySql Dump very small file
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 */;
June 19th, 2013, 10:35 AM
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.
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:
June 21st, 2013, 01:25 AM
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.
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