SELECT count(*) from table gives me 3296869 rows.
The table only contains 4 columns, storing dropped domains. I tried to dump the sql through:
$backupFile = $dbname . date("Y-m-d-H-i-s") . '.gz';
$command = "mysqldump --opt -h $dbhost -u $dbuser -p $dbpass $dbname | gzip > $backupFile";
However, this just dumps an empty 20 KB gzipped file. My client is using shared hosting so the server specs and resource usage aren’t top of the line.
I’m not even given ssh access or access directly to the database so I have to make queries through PHP scripts I upload via FTP ( SFTP isn’t an option, again ).
Is there some way I can perhaps sequentially download portions of it, or pass an argument to mysqldump that will optimize it?
I came across http://jeremy.zawodny.com/blog/archives/000690.html which mentions the -q flag and tried that but it didn’t seem to do anything differently.
EDIT: Just came up with the idea that perhaps mysqldump isn’t installed and it only does the gzip, but system isnt complaining.. trying to error check..
EDIT #2: which mysqldump returned /usr/bin/mysqldump so it’s there.
Try to use this command (without spaces):
In your case mysqldump trying to dump table $dbname from database $dbpass and dont finds it.
Also you can use flag –single-transaction if you use InnoDB tables.