Skip to content

MariaDB Functions

🛠️ Tools · ⬅ Top


MariaDB is the open-source successor to MySQL which was acquired by Oracle. These functions can be used with any installation which is compatible with MariaDB or MySQL.

mariadbDump

Dump a MariaDB database to raw SQL

Usage

mariadbDump [ --help ] [ --print ] [ --binary ] [ --lock ] [ --password password ] [ --user user ] [ --host host ] [ --port port ]

Dump a MariaDB database to raw SQL

Arguments

  • --help - Optional. Flag. Display this help.
  • --print - Optional. Flag. Show the command.
  • --binary - Optional. Executable. The binary to use to do the dump. Defaults to MARIADB_BINARY_DUMP.
  • --lock - Optional. Flag. Lock the database during dump
  • --password password - Optional. String. Password to connect
  • --user user - Optional. String. User to connect
  • --host host - Optional. String. Host to connect
  • --port port - Optional. Integer. Port to connect

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

mariadbConnect

Connect to a mariadb-type database using a URL

Usage

mariadbConnect [ dsn ] [ binary ] [ --print ]

Connect to a mariadb-type database using a URL

Arguments

  • dsn - URL. Database to connect to. All arguments after this are passed to binary.
  • binary - Callable. Executable to connect to the database.
  • --print - Flag. Optional. Just print the statement instead of running it.

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

Environment

mariadbDumpClean

Clean mariadb dumps for import

Usage

mariadbDumpClean

Clean mariadb dumps of the dreaded code /*!999999\- enable the sandbox mode */ - Official documentation

Reads standard input

mariadbDump

Writes to standard output

mariadbDump (cleaned)

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error