Name
mysqlimport
Synopsis
mysqlimport [options
]database
[file
]
Reads a file of data in a variety of common formats (such as comma delimited or fixed width) and inserts the data into a database. A table with the same name as the file must exist in the database with enough columns of the appropriate type to store the data.
Options
- -?, --help
Display usage information.
- -# debuglevel, --debug=debuglevel
Set the debugging level. A list of all of the available options can be found at http://www.turbolift.com/mysql/appendixC.html.
- -d, --delete
Delete all data currently in the table before inserting the new data.
- -f, --force
Do not exit if an error is encountered.
- --fields-terminated-by=string
Indicates that the fields in the data file are terminated by a string.
- --fields-enclosed-by=string
Indicates that the fields in the data file are enclosed by a string.
- --fields-optionally-enclosed-by=string
Indicates that the fields in the data file could also be enclosed by another string.
- --fields-escaped-by=string
The string used as escape characters in the data file.
- -h hostname, --host=hostname
Connect to a database server on a remote host.
- -I, --ignore
Ignore the new data if it conflicts with an existing unique key.
- -l, --lock-tables
Lock the tables before inserting the data.
- -p [password], --password[=password]
Password used to connect to the database server. If no argument is given, the password is asked from the command line.
- -P port, --port=port
Port used to connect to a remove database server.
- -r, --replace
If the ...
Get MySQL and mSQL now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.