Export Data to a TSV File
This page is part of MariaDB's Documentation.
The parent of this page is: Data Export
Topics on this page:
Overview
MariaDB SkySQL customers can export data from a table in a SkySQL service to a TSV file using the mariadb
client:
The
mariadb
client provides a command-line interface (CLI)The
mariadb
client is available for Linux and WindowsThe
mariadb
client supports many command-line options
Compatibility
Enterprise Server Single Node
Enterprise Server With Replica(s)
Xpand Distributed SQL
ColumnStore Data Warehouse
Export Data
Determine the connection parameters for your MariaDB SkySQL service.
Use MariaDB Client with the connection information to export your schema from your MariaDB SkySQL database service:
$ mariadb --host FULLY_QUALIFIED_DOMAIN_NAME --port TCP_PORT \ --user DATABASE_USER --password \ --ssl-verify-server-cert \ --ssl-ca ~/PATH_TO_PEM_FILE \ --default-character-set=utf8 \ --batch \ --skip-column-names \ --execute='SELECT * FROM accounts.contacts;' \ > contacts.tsv
Replace
FULLY_QUALIFIED_DOMAIN_NAME
with the Fully Qualified Domain Name of your service.Replace
TCP_PORT
with the read-write or read-only port of your service.Replace
DATABASE_USER
with the default username for your service, or the username you created.Replace
~/PATH_TO_PEM_FILE
with the path to the certificate authority chain (.pem) file.Optionally, for large tables, specify the
--quick
command-line option to disable result caching and reduce memory usage.
After the command is executed, you will be prompted for a password. Enter the default password for your default user, the password you set for the default user, or the password for the database user you created.