mariadb names - use mariadb-admin and mysql (10.6+)

This commit is contained in:
Daniel Black 2022-02-09 10:17:34 +11:00
parent a59f413529
commit da581f9a85
4 changed files with 11 additions and 9 deletions

View File

@ -141,10 +141,10 @@ docker_temp_server_start() {
fi
}
# Stop the server. When using a local socket file mysqladmin will block until
# Stop the server. When using a local socket file mariadb-admin will block until
# the shutdown is complete.
docker_temp_server_stop() {
if ! MYSQL_PWD=$MARIADB_ROOT_PASSWORD mysqladmin shutdown -uroot --socket="${SOCKET}"; then
if ! MYSQL_PWD=$MARIADB_ROOT_PASSWORD mariadb-admin shutdown -uroot --socket="${SOCKET}"; then
mysql_error "Unable to shut down server."
fi
}
@ -241,7 +241,7 @@ docker_exec_client() {
if [ -n "$MYSQL_DATABASE" ]; then
set -- --database="$MYSQL_DATABASE" "$@"
fi
mysql --protocol=socket -uroot -hlocalhost --socket="${SOCKET}" "$@"
mariadb --protocol=socket -uroot -hlocalhost --socket="${SOCKET}" "$@"
}
# Execute sql script, passed via stdin

View File

@ -141,10 +141,10 @@ docker_temp_server_start() {
fi
}
# Stop the server. When using a local socket file mysqladmin will block until
# Stop the server. When using a local socket file mariadb-admin will block until
# the shutdown is complete.
docker_temp_server_stop() {
if ! MYSQL_PWD=$MARIADB_ROOT_PASSWORD mysqladmin shutdown -uroot --socket="${SOCKET}"; then
if ! MYSQL_PWD=$MARIADB_ROOT_PASSWORD mariadb-admin shutdown -uroot --socket="${SOCKET}"; then
mysql_error "Unable to shut down server."
fi
}
@ -241,7 +241,7 @@ docker_exec_client() {
if [ -n "$MYSQL_DATABASE" ]; then
set -- --database="$MYSQL_DATABASE" "$@"
fi
mysql --protocol=socket -uroot -hlocalhost --socket="${SOCKET}" "$@"
mariadb --protocol=socket -uroot -hlocalhost --socket="${SOCKET}" "$@"
}
# Execute sql script, passed via stdin

View File

@ -141,10 +141,10 @@ docker_temp_server_start() {
fi
}
# Stop the server. When using a local socket file mysqladmin will block until
# Stop the server. When using a local socket file mariadb-admin will block until
# the shutdown is complete.
docker_temp_server_stop() {
if ! MYSQL_PWD=$MARIADB_ROOT_PASSWORD mysqladmin shutdown -uroot --socket="${SOCKET}"; then
if ! MYSQL_PWD=$MARIADB_ROOT_PASSWORD mariadb-admin shutdown -uroot --socket="${SOCKET}"; then
mysql_error "Unable to shut down server."
fi
}
@ -241,7 +241,7 @@ docker_exec_client() {
if [ -n "$MYSQL_DATABASE" ]; then
set -- --database="$MYSQL_DATABASE" "$@"
fi
mysql --protocol=socket -uroot -hlocalhost --socket="${SOCKET}" "$@"
mariadb --protocol=socket -uroot -hlocalhost --socket="${SOCKET}" "$@"
}
# Execute sql script, passed via stdin

View File

@ -130,6 +130,8 @@ for version in "${versions[@]}"; do
sed -i -e '/^CMD/s/mysqld/mariadbd/' "$version/Dockerfile"
sed -i -e 's/mysql_upgrade\([^_]\)/mariadb-upgrade\1/' \
-e 's/mysqldump/mariadb-dump/' \
-e 's/mysqladmin/mariadb-admin/' \
-e 's/\bmysql --protocol\b/mariadb --protocol/' \
-e 's/mysql_install_db/mariadb-install-db/' \
-e "0,/#ENDOFSUBSTITIONS/s/mysqld/mariadbd/" \
-e 's/mysql_tzinfo_to_sql/mariadb-tzinfo-to-sql/' \