Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where I can find a list of "mysqldump" exit codes?

I know that exit code = 0 means No error.

I got exit code = 2. What does it means ?

Where I can see the complete list of mysqldump exit codes ?

like image 278
Misha Moroshko Avatar asked Oct 02 '10 13:10

Misha Moroshko


People also ask

Where can I find Mysqldump file?

The mysqldump tool is located in the root/bin directory of the MySQL installation directory.

How can I get Mysqldump from all databases?

To dump entire databases, do not name any tables following db_name , or use the --databases or --all-databases option. To see a list of the options your version of mysqldump supports, issue the command mysqldump --help .

What is Mysqldump command?

It dumps one or more MySQL databases for backup or transfer to another SQL server. The mysqldump command can also generate output in CSV, other delimited text, or XML format.

Does Mysqldump lock the database?

By default, the mysqldump utility, which allows to back a MySQL database, will perform a lock on all tables until the backup is complete. In many cases, the amount of data in the database and the uptime requirements will not allow this lock in real life.


1 Answers

Taken from client/mysqldump.c in MySQL 5.1.59:

#define EX_USAGE 1
#define EX_MYSQLERR 2
#define EX_CONSCHECK 3
#define EX_EOM 4
#define EX_EOF 5 /* ferror for output file was got */
#define EX_ILLEGAL_TABLE 6

Skimming through the source, EX_MYSQLERR seems to be used mostly for errors from the server, but also in case malloc fails. CONSCHECK seems to stand for consistency checks. EX_EOM is returned for some _alloc calls too - "End Of Memory"?

like image 87
Peter Avatar answered Sep 30 '22 14:09

Peter