Skip to content
Snippets Groups Projects
Commit ed64dc0a authored by Vincent Massol's avatar Vincent Massol
Browse files

[Misc] Upgrade MySQL examples to use 8.2

* Also propagated the upgrade of the MariaDB connector from the previous commit to the various environments
parent 9f44517d
No related branches found
No related tags found
No related merge requests found
......@@ -62,8 +62,8 @@ RUN rm -rf /usr/local/tomcat/webapps/* && \
# Copy the JDBC driver in the XWiki webapp
# For MariaDB, download the MariaDB driver version from the Maven Central repository to control the version
# used.
ENV MARIADB_JDBC_VERSION="3.2.0"
ENV MARIADB_JDBC_SHA256="adf9df10bc9b2a137def36d6a495812258f430d4a8f7946727c61558e6c73941"
ENV MARIADB_JDBC_VERSION="3.3.0"
ENV MARIADB_JDBC_SHA256="8262c79463e6b0932f60f55b61ca14087fdcafb117caa87259cd3a64409cd4fa"
ENV MARIADB_JDBC_PREFIX="https://repo1.maven.org/maven2/org/mariadb/jdbc/mariadb-java-client/${MARIADB_JDBC_VERSION}"
ENV MARIADB_JDBC_ARTIFACT="mariadb-java-client-${MARIADB_JDBC_VERSION}.jar"
ENV MARIADB_JDBC_TARGET="/usr/local/tomcat/webapps/ROOT/WEB-INF/lib/${MARIADB_JDBC_ARTIFACT}"
......
......@@ -46,7 +46,7 @@ services:
- bridge
# The container that runs the database (mysql)
db:
image: "mysql:8.1"
image: "mysql:8.2"
container_name: xwiki-mysql-db
# - Provide a name instead of an auto-generated id for the mysql data, to make it simpler to identify in
# 'docker volume ls'
......
......@@ -62,8 +62,8 @@ RUN rm -rf /usr/local/tomcat/webapps/* && \
# Copy the JDBC driver in the XWiki webapp
# For MariaDB, download the MariaDB driver version from the Maven Central repository to control the version
# used.
ENV MARIADB_JDBC_VERSION="3.2.0"
ENV MARIADB_JDBC_SHA256="adf9df10bc9b2a137def36d6a495812258f430d4a8f7946727c61558e6c73941"
ENV MARIADB_JDBC_VERSION="3.3.0"
ENV MARIADB_JDBC_SHA256="8262c79463e6b0932f60f55b61ca14087fdcafb117caa87259cd3a64409cd4fa"
ENV MARIADB_JDBC_PREFIX="https://repo1.maven.org/maven2/org/mariadb/jdbc/mariadb-java-client/${MARIADB_JDBC_VERSION}"
ENV MARIADB_JDBC_ARTIFACT="mariadb-java-client-${MARIADB_JDBC_VERSION}.jar"
ENV MARIADB_JDBC_TARGET="/usr/local/tomcat/webapps/ROOT/WEB-INF/lib/${MARIADB_JDBC_ARTIFACT}"
......
......@@ -46,7 +46,7 @@ services:
- bridge
# The container that runs the database (mysql)
db:
image: "mysql:8.1"
image: "mysql:8.2"
container_name: xwiki-mysql-db
# - Provide a name instead of an auto-generated id for the mysql data, to make it simpler to identify in
# 'docker volume ls'
......
......@@ -62,8 +62,8 @@ RUN rm -rf /usr/local/tomcat/webapps/* && \
# Copy the JDBC driver in the XWiki webapp
# For MariaDB, download the MariaDB driver version from the Maven Central repository to control the version
# used.
ENV MARIADB_JDBC_VERSION="3.2.0"
ENV MARIADB_JDBC_SHA256="adf9df10bc9b2a137def36d6a495812258f430d4a8f7946727c61558e6c73941"
ENV MARIADB_JDBC_VERSION="3.3.0"
ENV MARIADB_JDBC_SHA256="8262c79463e6b0932f60f55b61ca14087fdcafb117caa87259cd3a64409cd4fa"
ENV MARIADB_JDBC_PREFIX="https://repo1.maven.org/maven2/org/mariadb/jdbc/mariadb-java-client/${MARIADB_JDBC_VERSION}"
ENV MARIADB_JDBC_ARTIFACT="mariadb-java-client-${MARIADB_JDBC_VERSION}.jar"
ENV MARIADB_JDBC_TARGET="/usr/local/tomcat/webapps/ROOT/WEB-INF/lib/${MARIADB_JDBC_ARTIFACT}"
......
......@@ -46,7 +46,7 @@ services:
- bridge
# The container that runs the database (mysql)
db:
image: "mysql:8.1"
image: "mysql:8.2"
container_name: xwiki-mysql-db
# - Provide a name instead of an auto-generated id for the mysql data, to make it simpler to identify in
# 'docker volume ls'
......
......@@ -98,7 +98,7 @@ This will provide enough permissions for the `xwiki` user to create new schemas
Note: Make sure the directories you are mounting into the container are fully-qualified, and aren't relative paths.
```console
docker run --net=xwiki-nw --name mysql-xwiki -v /my/path/mysql:/var/lib/mysql -v /my/path/mysql-init:/docker-entrypoint-initdb.d -e MYSQL_ROOT_PASSWORD=xwiki -e MYSQL_USER=xwiki -e MYSQL_PASSWORD=xwiki -e MYSQL_DATABASE=xwiki -d mysql:8.1 --character-set-server=utf8mb4 --collation-server=utf8mb4_bin --explicit-defaults-for-timestamp=1
docker run --net=xwiki-nw --name mysql-xwiki -v /my/path/mysql:/var/lib/mysql -v /my/path/mysql-init:/docker-entrypoint-initdb.d -e MYSQL_ROOT_PASSWORD=xwiki -e MYSQL_USER=xwiki -e MYSQL_PASSWORD=xwiki -e MYSQL_DATABASE=xwiki -d mysql:8.2 --character-set-server=utf8mb4 --collation-server=utf8mb4_bin --explicit-defaults-for-timestamp=1
```
You should adapt the command line to use the passwords that you wish for the MySQL root password and for the `xwiki` user password (make sure to also change the GRANT command).
......@@ -108,7 +108,7 @@ Notes:
- The `explicit-defaults-for-timestamp` parameter was introduced in MySQL 5.6.6 and will thus work only for that version and beyond. If you are using an older MySQL version, please use the following instead:
```console
docker run --net=xwiki-nw --name mysql-xwiki -v /my/path/mysql:/var/lib/mysql -v /my/path/mysql-init:/docker-entrypoint-initdb.d -e MYSQL_ROOT_PASSWORD=xwiki -e MYSQL_USER=xwiki -e MYSQL_PASSWORD=xwiki -e MYSQL_DATABASE=xwiki -d mysql:8.1 --character-set-server=utf8mb4 --collation-server=utf8mb4_bin
docker run --net=xwiki-nw --name mysql-xwiki -v /my/path/mysql:/var/lib/mysql -v /my/path/mysql-init:/docker-entrypoint-initdb.d -e MYSQL_ROOT_PASSWORD=xwiki -e MYSQL_USER=xwiki -e MYSQL_PASSWORD=xwiki -e MYSQL_DATABASE=xwiki -d mysql:8.2 --character-set-server=utf8mb4 --collation-server=utf8mb4_bin
```
#### Starting MariaDB
......@@ -205,7 +205,7 @@ services:
networks:
- bridge
db:
image: "mysql:8.1"
image: "mysql:8.2"
container_name: xwiki-mysql-db
volumes:
- mysql-data:/var/lib/mysql
......@@ -372,7 +372,7 @@ services:
- xwiki-db-username
- xwiki-db-password
db:
image: "mysql:8.1"
image: "mysql:8.2"
volumes:
- mysql-data:/var/lib/mysql
environment:
......@@ -551,7 +551,7 @@ services:
networks:
- bridge
db:
image: "mysql:8.1"
image: "mysql:8.2"
container_name: xwiki-db
volumes:
- mysql-data:/var/lib/mysql
......
......@@ -46,7 +46,7 @@ services:
- bridge
# The container that runs the database (${db})
db:
<% if (db == 'mysql') print '''image: "mysql:8.1"
<% if (db == 'mysql') print '''image: "mysql:8.2"
container_name: xwiki-mysql-db
# - Provide a name instead of an auto-generated id for the mysql data, to make it simpler to identify in
# 'docker volume ls'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment

Consent

On this website, we use the web analytics service Matomo to analyze and review the use of our website. Through the collected statistics, we can improve our offerings and make them more appealing for you. Here, you can decide whether to allow us to process your data and set corresponding cookies for these purposes, in addition to technically necessary cookies. Further information on data protection—especially regarding "cookies" and "Matomo"—can be found in our privacy policy. You can withdraw your consent at any time.