You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-12
Original file line number
Diff line number
Diff line change
@@ -77,13 +77,13 @@ Find custom.cnf in /config for config changes (restart container for them to tak
77
77
78
78
The `MYSQL_ROOT_PASSWORD MYSQL_DATABASE MYSQL_USER MYSQL_PASSWORD REMOTE_SQL` env values can be set in a file:
79
79
80
-
```
80
+
```path
81
81
/config/env
82
82
```
83
83
84
84
Using the following format:
85
85
86
-
```
86
+
```env
87
87
MYSQL_ROOT_PASSWORD="ROOT_ACCESS_PASSWORD"
88
88
MYSQL_DATABASE="USER_DB_NAME"
89
89
MYSQL_USER="MYSQL_USER"
@@ -97,24 +97,16 @@ These settings can be mixed and matched with Docker ENV settings as you require,
97
97
98
98
We support a one time run of custom sql files on init. In order to use this place `*.sql` files in:
99
99
100
-
```
100
+
```path
101
101
/config/initdb.d/
102
102
```
103
103
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.
104
104
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
-
113
105
### Check and Repair
114
106
115
107
If user databases are not in a healthy state (sometimes caused by a failed upgrade), it may be remedied by running:
116
108
117
-
```
109
+
```shell
118
110
mariadb-check -u root -p<PASSWORD> -c -A # check all databases for errors
119
111
mariadb-check -u root -p<PASSWORD> -r -A # repair all databases
120
112
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
123
115
124
116
After running the above commands, you may need to run the upgrade command again.
125
117
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
+
126
126
## Usage
127
127
128
128
Here are some example snippets to help you get started creating a container.
Copy file name to clipboardExpand all lines: readme-vars.yml
+12-12
Original file line number
Diff line number
Diff line change
@@ -68,13 +68,13 @@ app_setup_block: |
68
68
69
69
The `MYSQL_ROOT_PASSWORD MYSQL_DATABASE MYSQL_USER MYSQL_PASSWORD REMOTE_SQL` env values can be set in a file:
70
70
71
-
```
71
+
```path
72
72
/config/env
73
73
```
74
74
75
75
Using the following format:
76
76
77
-
```
77
+
```env
78
78
MYSQL_ROOT_PASSWORD="ROOT_ACCESS_PASSWORD"
79
79
MYSQL_DATABASE="USER_DB_NAME"
80
80
MYSQL_USER="MYSQL_USER"
@@ -88,24 +88,16 @@ app_setup_block: |
88
88
89
89
We support a one time run of custom sql files on init. In order to use this place `*.sql` files in:
90
90
91
-
```
91
+
```path
92
92
/config/initdb.d/
93
93
```
94
94
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.
95
95
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
-
104
96
### Check and Repair
105
97
106
98
If user databases are not in a healthy state (sometimes caused by a failed upgrade), it may be remedied by running:
107
99
108
-
```
100
+
```shell
109
101
mariadb-check -u root -p<PASSWORD> -c -A # check all databases for errors
110
102
mariadb-check -u root -p<PASSWORD> -r -A # repair all databases
111
103
mariadb-check -u root -p<PASSWORD> -a -A # analyze all databases
@@ -114,6 +106,14 @@ app_setup_block: |
114
106
115
107
After running the above commands, you may need to run the upgrade command again.
116
108
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:
0 commit comments