Skip to content

Update MariaDB from 10.11 to 11.4 (LTS)#93

Closed
kdambekalns wants to merge 1 commit intomainfrom
task/upgrade-mariadb
Closed

Update MariaDB from 10.11 to 11.4 (LTS)#93
kdambekalns wants to merge 1 commit intomainfrom
task/upgrade-mariadb

Conversation

@kdambekalns
Copy link
Member

This upgrades the used MariaDB from version 10.11 to the current long-term series, MariaDB 11.4, maintained until May 2029.

@kdambekalns kdambekalns self-assigned this Sep 24, 2024
- {{databasePath}}:/var/lib/mysql
healthcheck:
test: "/usr/bin/mysql --user=root --password=password --execute \"SHOW DATABASES;\""
test: "/usr/bin/mariadb --user=root --password=password --execute \"SHOW DATABASES;\""
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As of MariaDB 11.0 the image no longer contains mysql-named binaries.


log.Debug("Creating project database (if needed) ...")
commandArgs = []string{"exec", "local_beach_database", "/bin/bash", "-c", "echo 'CREATE DATABASE IF NOT EXISTS `" + sandbox.ProjectName + "`' | mysql -u root --password=password"}
commandArgs = []string{"exec", "local_beach_database", "/bin/bash", "-c", "echo 'CREATE DATABASE IF NOT EXISTS `" + sandbox.ProjectName + "`' | mariadb -u root --password=password"}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As of MariaDB 11.0 the image no longer contains mysql-named binaries.

return errors.New("failed to check for database server container health")
}
if strings.TrimSpace(output) == "healthy" {
commandArgs := []string{"exec", "local_beach_database", "mariadb-upgrade", "-u", "root", "--password=password"}
Copy link
Member Author

@kdambekalns kdambekalns Sep 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This runs the upgrade – on every start. But since it does no harm to run it when not needed, I chose this way.

An alternative would be to check if the upgrade is needed (using mariadb-upgrade --check-if-upgrade-is-needed), but that seemed superfluous.

This upgrades the used MariaDB from version 10.11 to the current
long-term series, MariaDB 11.4, maintained until May 2029.
@kdambekalns
Copy link
Member Author

Closing in favor of #103.

@kdambekalns kdambekalns closed this Apr 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants