Ecto.Adapters.MySQL
Adapter module for MySQL.
It handles and pools the connections to the MySQL
database using mariaex
with poolboy
.
Options
MySQL options split in different categories described below. All options should be given via the repository configuration.
Compile time options
Those options should be set in the config file and require recompilation in order to make an effect.
:adapter
- The adapter name, in this case,Ecto.Adapters.MySQL
:timeout
- The default timeout to use on queries, defaults to5000
Connection options
:hostname
- Server hostname;:port
- Server port (default: 3306);:username
- Username;:password
- User password;:parameters
- Keyword list of connection parameters;:ssl
- Set to true if ssl should be used (default: false);:ssl_opts
- A list of ssl options, see ssl docs;:connect_timeout
- The timeout for establishing new connections, defaults to5000
Pool options
:size
- The number of connections to keep in the pool;:max_overflow
- The maximum overflow of connections (see poolboy docs);:lazy
- If false all connections will be started immediately on Repo startup (default: true)
Storage options
:charset
- the database encoding (default: "utf8"):collation
- the collation order