SQL Driver: MySQL

Driver name mysql.

Driver for MySQL / MariaDB server.

To compile support for this driver, you need to have MySQL client library and headers installed.

For MariaDB, you need to have compatibility headers installed.

Supported Options

client_flags

Flags to use when connecting to the database, provided as base-10 number.

connect_timeout

How many seconds to wait for connection.

dbname
  • Default: <empty>

  • Values: String

Database name to connect to.

host
  • Default: localhost

  • Values: String

Host to connect to.

Note that MySQL driver can default to using UNIX socket connection when host is localhost and port is left as default.

To force it to use TCP connection, set host to 127.0.0.1.

hostaddr

Alias for host.

option_file
  • Default: <empty>

  • Values: String

File to read for client library specific configuration.

option_group
  • Default: <empty>

  • Values: String

Section name to read from option_file.

password
  • Default: <empty>

  • Values: String

Password for authentication.

port

Port to connect to.

read_timeout

Timeout in seconds when reading data from server.

ssl_ca
  • Default: <empty>

  • Values: String

Path to SSL certificate authority file to use to validate peer certificate.

ssl_ca_path
  • Default: <empty>

  • Values: String

Path to directory of SSL certificate authority files to use to validate peer certificate.

ssl_cert
  • Default: <empty>

  • Values: String

Path to a certificate file to use for authenticating against the remote server.

ssl_cipher
  • Default: <library dependent>

  • Values: String

Cipher to use when connecting. See client library documentation.

ssl_key
  • Default: <empty>

  • Values: String

Path to private key matching ssl_cert to use for authenticating against the remote server.

ssl_verify_server_cert

Whether to verify server certificate.

user
  • Default: <empty>

  • Values: String

Username for authentication.

write_timeout

Timeout in seconds when writing data to server.