-
-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update MariaDB from 10.11 to 11.4 (LTS) #93
base: main
Are you sure you want to change the base?
Conversation
container_name: local_beach_database | ||
networks: | ||
- local_beach | ||
volumes: | ||
- {{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;\"" |
There was a problem hiding this comment.
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.
@@ -71,7 +71,7 @@ func handleStartRun(cmd *cobra.Command, args []string) { | |||
} | |||
|
|||
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"} |
There was a problem hiding this comment.
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.
@@ -177,6 +177,12 @@ func startLocalBeach() error { | |||
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"} |
There was a problem hiding this comment.
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.
d09508c
to
7aebe68
Compare
This upgrades the used MariaDB from version 10.11 to the current long-term series, MariaDB 11.4, maintained until May 2029.