-
-
Notifications
You must be signed in to change notification settings - Fork 3
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -152,7 +152,7 @@ func startLocalBeach() error { | |
|
||
databaseStatusOutput, err := exec.RunCommand("docker", []string{"ps", "--filter", "name=local_beach_database", "--filter", "status=running", "-q"}) | ||
if err != nil { | ||
return errors.New("failed checking status of container local_beach_database container") | ||
return errors.New("failed checking status of container local_beach_database container, maybe the Docker daemon is not running") | ||
} | ||
|
||
if len(nginxStatusOutput) == 0 || len(databaseStatusOutput) == 0 { | ||
|
@@ -187,6 +187,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 commentThe 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 |
||
output, err = exec.RunCommand("docker", commandArgs) | ||
if err != nil { | ||
log.Error(output) | ||
return errors.New("mariadb-upgrade failed") | ||
} | ||
break | ||
} | ||
if tries == 10 { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. As of MariaDB 11.0 the image no longer contains |
||
output, err = exec.RunCommand("docker", commandArgs) | ||
if err != nil { | ||
log.Fatal(output) | ||
|
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.