Adapter: MySQL
Installation
You must install the harlequin-mysql
package into the same environment as harlequin
. The best and easiest way to do this is to use uv
to install Harlequin with the mysql
extra:
$Â uv tool install 'harlequin[mysql]'
Using Harlequin with MySQL
To connect to a MySQL database, run Harlequin with the -a mysql
option and pass connection parameters as CLI options:
$Â harlequin -a mysql -h localhost -p 3306 -U root --password example --database dev
The MySQL adapter does not accept a connection string or DSN.
Connection Options
The supported connection options are:
host
port
unix_socket
database
user
password
password2
password3
connection_timeout
ssl-ca
ssl-cert
ssl-disabled
ssl-key
openid-token-file
pool-size
For descriptions of each option, run:
harlequin --help