MySQL and MariaDB
Requirements
- Build:
libmysqlclientorlibmariadbdevelopment files, found withpkg-config(mysqlclientis tried first, thenlibmariadb). - Run: the corresponding client library.
Connection string
mysql://[user.password@]host[:port]/database[?options]
Example:
mysql://localhost:3306/demo?client_encoding=utf8mb4
Options
client_encoding-
the character set of the connection, for example
utf8mb4. autocommit-
passed to the client library (
mysql_autocommit). updatable_cursors- emulate updatable cursors; the table must have a unique key.
NoteTo be verified
Is updatable_cursors read by the MySQL driver (it is in the SQLite driver)?
Placeholders
MySQL only accepts ? placeholders: precompile with -z a, or connect with fixup_params=on.
NoteTo be verified
Whether the MySQL driver converts $n placeholders itself.