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 4045300
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T13:24:26+00:00 2026-05-20T13:24:26+00:00

SELECT count(*) from table gives me 3296869 rows. The table only contains 4 columns,

  • 0

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.

  • 1 1 Answer
  • 1 View
  • 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-05-20T13:24:27+00:00Added an answer on May 20, 2026 at 1:24 pm

    Try to use this command (without spaces):

    $command = "mysqldump --opt -h $dbhost -u$dbuser -p$dbpass $dbname | gzip -c > $backupFile";
    

    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.

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

Sidebar

Related Questions

I got more than 7 million rows in a table and SELECT COUNT(*) FROM
SELECT count(*) FROM table WHERE column ilike '%/%'; gives me the number of values
EXEC [dbo].[SP] @Param = ( SELECT COUNT(id) FROM TABLE ) Gives errors, so what's
mysql> select count(*) from table where relation_title='xxxxxxxxx'; +----------+ | count(*) | +----------+ | 1291958
Example: select count(*) from my table where column1 is not null and (column1 =
MY query looks like this: SELECT COUNT(entryID) FROM table WHERE date >= DATE_SUB(CURDATE(), INTERVAL
For example: declare @bitHaveRows bit select @bitHaveRows = count(*) from table where (predicate) Are
If I run a query such as: SELECT COUNT(*) as num FROM table WHERE
I have a table watchlist containing today almost 3Mil records. mysql> select count(*) from
Here is my sample query: SELECT userid,count(*) FROM hits GROUP BY userid My table

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.