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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T03:40:10+00:00 2026-06-12T03:40:10+00:00

Does mysqldump return error codes I can use on a Windows batch file with

  • 0

Does mysqldump return error codes I can use on a Windows batch file with such code: if errorlevel 1 and so on?

I would like to verify the success or failure of a backup.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 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-06-12T03:40:12+00:00Added an answer on June 12, 2026 at 3:40 am

    Mysqldump returns the following:

    0 - Success
    1 - Warning
    2 - Exception
    

    http://dev.mysql.com/doc/refman/5.5/en/error-types.html

    So you should probably use if errorlevel 2 to ignore warnings and only handle errors (depending on your needs and what warnings might occur, of course). Something like this might work:

    mysqldump.exe --user USERNAME --password=PASSWORD --database DATABASE > dump.sql
    
    REM Check for error
    if %ERRORLEVEL% NEQ 0 (goto ERROR)
    
    echo MySQL was dumped successfully     
    goto :EOF
    
    :ERROR
       echo Error occured 
       exit
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm getting this error when I run mysqldump like this: $ mysqldump -u my_user
I have mysql dump command that I would like to run from from windows
Does Windows Phone 7 have anything like iPhone's UITableView? [Basically, I'm porting an iOS
Does anyone know if there is a way to generate different code in the
Does anyone know why UsernameExists wont return True. I must have my syntax messed
Does the following psuedo code accomplish my goal of cleaning up after myself when
Does anyone know how I can implement a single Touch Event. A simple, one
So I have a script that does attempts to create a sql file on
Does mysqldump dump index information too, so when a dump is loaded indexes are
When performing the default mysqldump on a innodb database, does it perform table locking

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.