Export Data to a TSV File


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 Windows

  • The mariadb client supports many command-line options


  • Distributed Transactions

  • Multi-Node Analytics

  • Replicated Transactions

  • Single Node Analytics

  • Single Node Transactions

Export Data

  1. Determine the connection parameters for your MariaDB SkySQL service.

  2. 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.

  3. 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.