Manage Aiven for MySQL® versions Early availability
Aiven for MySQL® supports multiple versions of MySQL running concurrently in the platform. Choose a version that best fits your needs and upgrade your service when ready.
Supported MySQL versions
From version 8.4, Aiven for MySQL supports two major upstream MySQL versions at a time. These are the two latest major versions that are stable on the Aiven Platform. You can select either version when you create a service or upgrade an existing service. If you do not select a version, the default is the latest stable version on the Aiven Platform.
See the supported versions in the Aiven for MySQL version reference.
Before you upgrade
Check available versions
Preview versions available for your service in Aiven Console:
- Major versions: Service Service settings page > Service management section > Actions > Upgrade version > Expand the version dropdown list.
- Minor versions: Service Overview page > Maintenance section > See the list of available mandatory and optional updates.
For automated upgrades, you get email notifications.
Check downgrade restrictions
Downgrading to a previous version is not supported due to data format incompatibilities. Always test upgrades in a non-production environment first.
To revert to a previous version:
- Create a service with the desired version.
- Restore data from a backup taken before the upgrade.
- Update your application connection strings.
Prerequisites for upgrade
Before upgrading your service:
- Test in development: Test the upgrade in a development environment first, for example, using service forking.
- Backup your data: Ensure you have recent backups. Backups are automatic, but verify they exist.
To upgrade your service version, check that:
- Your Aiven for MySQL service is running.
- Target version to upgrade to is available for manual upgrade.
- You can use one of the following tools to upgrade:
Upgrade your service
- Console
- CLI
- API
- Terraform
- Kubernetes
-
In the Aiven Console, go to your Aiven for MySQL service.
-
Open the Service settings page from the sidebar, and go to the Service management section.
-
Click Actions > Upgrade version.
-
Expand the version dropdown list, and select a version to upgrade to.
warningWhen you click Upgrade:
- The system applies the upgrade immediately.
- You cannot downgrade the service to a previous version.
-
Click Upgrade.
Upgrade the service version using the avn service update command:
avn service update SERVICE_NAME -c mysql_version="N.N"
Parameters:
SERVICE_NAME: Name of your serviceN.N: Target service version to upgrade to, for example8.4
Call the ServiceUpdate
endpoint to set mysql_version:
curl --request PUT \
--url https://api.aiven.io/v1/project/PROJECT_NAME/service/SERVICE_NAME \
--header 'Authorization: Bearer BEARER_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"user_config": {
"mysql_version": "N.N"
}
}'
Parameters:
PROJECT_NAME: Name of your projectSERVICE_NAME: Name of your serviceBEARER_TOKEN: Your API authentication tokenN.N: Target service version to upgrade to, for example8.4
Use the
aiven_mysql
resource to set
mysql_version:
resource "aiven_mysql" "example" {
project = var.PROJECT_NAME
cloud_name = "CLOUD_NAME"
plan = "PLAN_NAME"
service_name = "SERVICE_NAME"
mysql_user_config {
mysql_version = "N.N"
}
}
Parameters:
PROJECT_NAME: Name of your projectCLOUD_NAME: Cloud region identifierPLAN_NAME: Service planSERVICE_NAME: Name of your serviceN.N: Target service version to upgrade to, for example8.4
Use the
MySQL
resource to set
mysql_version:
apiVersion: aiven.io/v1alpha1
kind: MySQL
metadata:
name: SERVICE_NAME
spec:
authSecretRef:
name: aiven-token
key: token
connInfoSecretTarget:
name: mysql-connection
project: PROJECT_NAME
cloudName: CLOUD_NAME
plan: PLAN_NAME
userConfig:
mysql_version: "N.N"
Apply the updated configuration:
kubectl apply -f mysql-service.yaml
Parameters:
PROJECT_NAME: Name of your projectSERVICE_NAME: Name of your serviceCLOUD_NAME: Cloud region identifierPLAN_NAME: Service planN.N: Target service version to upgrade to, for example8.4
Version selection for new services
When creating an Aiven for MySQL service:
- Default version: The latest stable version on the Aiven Platform is the default version.
- Explicit selection: You can specify a version using the
mysql_versionparameter. - Version availability: Only versions in
availablestate can be selected.
Example (CLI):
avn service create SERVICE_NAME \
--service-type mysql \
--plan PLAN_NAME \
--cloud CLOUD_NAME \
-c mysql_version="N.N"
Parameters:
SERVICE_NAME: Name of your servicePLAN_NAME: Service planCLOUD_NAME: Cloud region identifierN.N: Service version, for example8.1
Related pages