Profiles

Charmed MySQL’s usage of resources depends on the chosen profile:

juju deploy mysql --config profile=<profile>

Profile values

Value

Description

Details

production
(default)

Maximum performance

~75% of unit memory granted for MySQL
max_connections= RAM / 12MiB (max safe value)

testing

Minimal resource usage

innodb_buffer_pool_size = 20MB
innodb_buffer_pool_chunk_size=1MB
group_replication_message_cache_size=128MB
max_connections=100
performance-schema-instrument=’memory/%=OFF’

You can also see all MySQL charm configuration options on Charmhub.

Change profile

To change the profile, use the juju config command. For example:

juju deploy mysql --config profile=testing && \
juju config mysql profile=production

Juju constraints

Juju constraints allows setting RAM/CPU limits for units:

juju deploy mysql --constraints cores=8 mem=16G

Juju constraints can be set together with the charm profile:

juju deploy mysql --constraints cores=8 mem=16G --config profile=testing