Skip to content

Commit bcc4912

Browse files
committed
Rearrange and improve wording
Signed-off-by: Eric Nemchik <[email protected]>
1 parent bef1809 commit bcc4912

File tree

2 files changed

+24
-24
lines changed

2 files changed

+24
-24
lines changed

README.md

+12-12
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,13 @@ Find custom.cnf in /config for config changes (restart container for them to tak
7777

7878
The `MYSQL_ROOT_PASSWORD MYSQL_DATABASE MYSQL_USER MYSQL_PASSWORD REMOTE_SQL` env values can be set in a file:
7979

80-
```
80+
```path
8181
/config/env
8282
```
8383

8484
Using the following format:
8585

86-
```
86+
```env
8787
MYSQL_ROOT_PASSWORD="ROOT_ACCESS_PASSWORD"
8888
MYSQL_DATABASE="USER_DB_NAME"
8989
MYSQL_USER="MYSQL_USER"
@@ -97,24 +97,16 @@ These settings can be mixed and matched with Docker ENV settings as you require,
9797

9898
We support a one time run of custom sql files on init. In order to use this place `*.sql` files in:
9999

100-
```
100+
```path
101101
/config/initdb.d/
102102
```
103103
This will have the same effect as setting the `REMOTE_SQL` environment variable. The sql will only be run on the containers first boot and setup.
104104

105-
### Upgrading
106-
107-
When this container initializes, if `MYSQL_ROOT_PASSWORD` is set an upgrade check will run. If an upgrade is required the log will indicate the need to run:
108-
109-
```
110-
mariadb-upgrade -u root -p<PASSWORD>
111-
```
112-
113105
### Check and Repair
114106

115107
If user databases are not in a healthy state (sometimes caused by a failed upgrade), it may be remedied by running:
116108

117-
```
109+
```shell
118110
mariadb-check -u root -p<PASSWORD> -c -A # check all databases for errors
119111
mariadb-check -u root -p<PASSWORD> -r -A # repair all databases
120112
mariadb-check -u root -p<PASSWORD> -a -A # analyze all databases
@@ -123,6 +115,14 @@ mariadb-check -u root -p<PASSWORD> -o -A # optimize all databases
123115

124116
After running the above commands, you may need to run the upgrade command again.
125117

118+
### Upgrading
119+
120+
When this container initializes, if `MYSQL_ROOT_PASSWORD` is set an upgrade check will run. If an upgrade is required the log will indicate the need stop any services that are accessing databases in this container, and then run the command:
121+
122+
```shell
123+
mariadb-upgrade -u root -p<PASSWORD>
124+
```
125+
126126
## Usage
127127

128128
Here are some example snippets to help you get started creating a container.

readme-vars.yml

+12-12
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,13 @@ app_setup_block: |
6868
6969
The `MYSQL_ROOT_PASSWORD MYSQL_DATABASE MYSQL_USER MYSQL_PASSWORD REMOTE_SQL` env values can be set in a file:
7070
71-
```
71+
```path
7272
/config/env
7373
```
7474
7575
Using the following format:
7676
77-
```
77+
```env
7878
MYSQL_ROOT_PASSWORD="ROOT_ACCESS_PASSWORD"
7979
MYSQL_DATABASE="USER_DB_NAME"
8080
MYSQL_USER="MYSQL_USER"
@@ -88,24 +88,16 @@ app_setup_block: |
8888
8989
We support a one time run of custom sql files on init. In order to use this place `*.sql` files in:
9090
91-
```
91+
```path
9292
/config/initdb.d/
9393
```
9494
This will have the same effect as setting the `REMOTE_SQL` environment variable. The sql will only be run on the containers first boot and setup.
9595
96-
### Upgrading
97-
98-
When this container initializes, if `MYSQL_ROOT_PASSWORD` is set an upgrade check will run. If an upgrade is required the log will indicate the need to run:
99-
100-
```
101-
mariadb-upgrade -u root -p<PASSWORD>
102-
```
103-
10496
### Check and Repair
10597
10698
If user databases are not in a healthy state (sometimes caused by a failed upgrade), it may be remedied by running:
10799
108-
```
100+
```shell
109101
mariadb-check -u root -p<PASSWORD> -c -A # check all databases for errors
110102
mariadb-check -u root -p<PASSWORD> -r -A # repair all databases
111103
mariadb-check -u root -p<PASSWORD> -a -A # analyze all databases
@@ -114,6 +106,14 @@ app_setup_block: |
114106
115107
After running the above commands, you may need to run the upgrade command again.
116108
109+
### Upgrading
110+
111+
When this container initializes, if `MYSQL_ROOT_PASSWORD` is set an upgrade check will run. If an upgrade is required the log will indicate the need stop any services that are accessing databases in this container, and then run the command:
112+
113+
```shell
114+
mariadb-upgrade -u root -p<PASSWORD>
115+
```
116+
117117
# changelog
118118
changelogs:
119119
- { date: "25.05.23:", desc: "Rebase to Alpine 3.18, deprecate armhf." }

0 commit comments

Comments
 (0)