Skip to content

Commit dac3eda

Browse files
committed
deprecate v5.5
1 parent 26c5afc commit dac3eda

File tree

3 files changed

+13
-147
lines changed

3 files changed

+13
-147
lines changed

Diff for: 5.5/README.md

+1-135
Original file line numberDiff line numberDiff line change
@@ -1,138 +1,4 @@
11
MySQL Docker image
22
==================
33

4-
This repository contains Dockerfiles for MySQL images for OpenShift.
5-
Users can choose between RHEL and CentOS based images.
6-
7-
Dockerfile for CentOS is called Dockerfile, Dockerfile for RHEL is called
8-
Dockerfile.rhel7.
9-
10-
11-
Environment variables and volumes
12-
----------------------------------
13-
14-
The image recognizes the following environment variables that you can set during
15-
initialization by passing `-e VAR=VALUE` to the Docker run command.
16-
17-
| Variable name | Description |
18-
| :--------------------- | ----------------------------------------- |
19-
| `MYSQL_USER` | User name for MySQL account to be created |
20-
| `MYSQL_PASSWORD` | Password for the user account |
21-
| `MYSQL_DATABASE` | Database name |
22-
| `MYSQL_ROOT_PASSWORD` | Password for the root user (optional) |
23-
24-
The following environment variables influence the MySQL configuration file. They are all optional.
25-
26-
| Variable name | Description | Default
27-
| :------------------------------ | ----------------------------------------------------------------- | -------------------------------
28-
| `MYSQL_LOWER_CASE_TABLE_NAMES` | Sets how the table names are stored and compared | 0
29-
| `MYSQL_MAX_CONNECTIONS` | The maximum permitted number of simultaneous client connections | 151
30-
| `MYSQL_MAX_ALLOWED_PACKET` | The maximum size of one packet or any generated/intermediate string | 200M
31-
| `MYSQL_FT_MIN_WORD_LEN` | The minimum length of the word to be included in a FULLTEXT index | 4
32-
| `MYSQL_FT_MAX_WORD_LEN` | The maximum length of the word to be included in a FULLTEXT index | 20
33-
| `MYSQL_AIO` | Controls the `innodb_use_native_aio` setting value in case the native AIO is broken. See http://help.directadmin.com/item.php?id=529 | 1
34-
| `MYSQL_TABLE_OPEN_CACHE` | The number of open tables for all threads | 400
35-
| `MYSQL_KEY_BUFFER_SIZE` | The size of the buffer used for index blocks | 32M (or 10% of available memory)
36-
| `MYSQL_SORT_BUFFER_SIZE` | The size of the buffer used for sorting | 256K
37-
| `MYSQL_READ_BUFFER_SIZE` | The size of the buffer used for a sequential scan | 8M (or 5% of available memory)
38-
| `MYSQL_INNODB_BUFFER_POOL_SIZE`| The size of the buffer pool where InnoDB caches table and index data | 32M (or 50% of available memory)
39-
| `MYSQL_INNODB_LOG_FILE_SIZE` | The size of each log file in a log group | 8M (or 15% of available available)
40-
| `MYSQL_INNODB_LOG_BUFFER_SIZE` | The size of the buffer that InnoDB uses to write to the log files on disk | 8M (or 15% of available memory)
41-
| `MYSQL_DEFAULTS_FILE` | Point to an alternative configuration file | /etc/my.cnf
42-
| `MYSQL_BINLOG_FORMAT` | Set sets the binlog format, supported values are `row` and `statement` | statement
43-
| `MYSQL_LOG_QUERIES_ENABLED` | To enable query logging set this to `1` | 0
44-
45-
46-
You can also set the following mount points by passing the `-v /host:/container` flag to Docker.
47-
48-
| Volume mount point | Description |
49-
| :----------------------- | -------------------- |
50-
| `/var/lib/mysql/data` | MySQL data directory |
51-
52-
**Notice: When mouting a directory from the host into the container, ensure that the mounted
53-
directory has the appropriate permissions and that the owner and group of the directory
54-
matches the user UID or name which is running inside the container.**
55-
56-
Usage
57-
---------------------------------
58-
59-
For this, we will assume that you are using the `openshift/mysql-55-centos7` image.
60-
If you want to set only the mandatory environment variables and not store
61-
the database in a host directory, execute the following command:
62-
63-
```
64-
$ docker run -d --name mysql_database -e MYSQL_USER=user -e MYSQL_PASSWORD=pass -e MYSQL_DATABASE=db -p 3306:3306 openshift/mysql-55-centos7
65-
```
66-
67-
This will create a container named `mysql_database` running MySQL with database
68-
`db` and user with credentials `user:pass`. Port 3306 will be exposed and mapped
69-
to the host. If you want your database to be persistent across container executions,
70-
also add a `-v /host/db/path:/var/lib/mysql/data` argument. This will be the MySQL
71-
data directory.
72-
73-
If the database directory is not initialized, the entrypoint script will first
74-
run [`mysql_install_db`](https://dev.mysql.com/doc/refman/en/mysql-install-db.html)
75-
and setup necessary database users and passwords. After the database is initialized,
76-
or if it was already present, `mysqld` is executed and will run as PID 1. You can
77-
stop the detached container by running `docker stop mysql_database`.
78-
79-
80-
MySQL auto-tuning
81-
-----------------
82-
83-
When the MySQL image is run with the `--memory` parameter set and you didn't
84-
specify value for some parameters, their values will be automatically
85-
calculated based on the available memory.
86-
87-
| Variable name | Configuration parameter | Relative value
88-
| :-------------------------------| ------------------------- | --------------
89-
| `MYSQL_KEY_BUFFER_SIZE` | `key_buffer_size` | 10%
90-
| `MYSQL_READ_BUFFER_SIZE` | `read_buffer_size` | 5%
91-
| `MYSQL_INNODB_BUFFER_POOL_SIZE` | `innodb_buffer_pool_size` | 50%
92-
| `MYSQL_INNODB_LOG_FILE_SIZE` | `innodb_log_file_size` | 15%
93-
| `MYSQL_INNODB_LOG_BUFFER_SIZE` | `innodb_log_buffer_size` | 15%
94-
95-
96-
MySQL root user
97-
---------------------------------
98-
The root user has no password set by default, only allowing local connections.
99-
You can set it by setting the `MYSQL_ROOT_PASSWORD` environment variable. This
100-
will allow you to login to the root account remotely. Local connections will
101-
still not require a password.
102-
103-
To disable remote root access, simply unset `MYSQL_ROOT_PASSWORD` and restart
104-
the container.
105-
106-
107-
Changing passwords
108-
------------------
109-
110-
Since passwords are part of the image configuration, the only supported method
111-
to change passwords for the database user (`MYSQL_USER`) and root user is by
112-
changing the environment variables `MYSQL_PASSWORD` and `MYSQL_ROOT_PASSWORD`,
113-
respectively.
114-
115-
Changing database passwords through SQL statements or any way other than through
116-
the environment variables aforementioned will cause a mismatch between the
117-
values stored in the variables and the actual passwords. Whenever a database
118-
container starts it will reset the passwords to the values stored in the
119-
environment variables.
120-
121-
Default my.cnf file
122-
-------------------
123-
With environment variables we are able to customize a lot of different parameters
124-
or configurations for the mysql bootstrap configurations. If you'd prefer to use
125-
your own configuration file, you can override the `MYSQL_DEFAULTS_FILE` env
126-
variable with the full path of the file you wish to use. For example, the default
127-
location is `/etc/my.cnf` but you can change it to `/etc/mysql/my.cnf` by setting
128-
`MYSQL_DEFAULTS_FILE=/etc/mysql/my.cnf`
129-
130-
Changing the replication binlog_format
131-
--------------------------------------
132-
Some applications may wish to use `row` binlog_formats (for example, those built
133-
with change-data-capture in mind). The default replication/binlog format is
134-
`statement` but to change it you can set the `MYSQL_BINLOG_FORMAT` environment
135-
variable. For example `MYSQL_BINLOG_FORMAT=row`. Now when you run the database
136-
with `master` replication turned on (ie, set the Docker/container `cmd` to be
137-
`run-mysqld-master`) the binlog will emit the actual data for the rows that change
138-
as opposed to the statements (ie, DML like insert...) that caused the change.
4+
**The MySQL 5.5 image is deprecated.**

Diff for: Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Variables are documented in hack/build.sh.
22
BASE_IMAGE_NAME = mysql
3-
VERSIONS = 5.5 5.6 5.7
3+
VERSIONS = 5.6 5.7
44
OPENSHIFT_NAMESPACES = 5.5
55

66
# Include common Makefile code.

Diff for: README.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ official [OpenShift Documentation](https://docs.openshift.org/latest/using_image
1111
Versions
1212
---------------
1313
MySQL versions currently provided are:
14-
* mysql-5.5
1514
* mysql-5.6
15+
* mysql-5.7
1616

1717
RHEL versions currently supported are:
1818
* RHEL7
@@ -33,32 +33,32 @@ Choose either the CentOS7 or RHEL7 based image:
3333
```
3434
$ git clone https://github.com/openshift/mysql.git
3535
$ cd mysql
36-
$ make build TARGET=rhel7 VERSION=5.5
36+
$ make build TARGET=rhel7 VERSION=5.7
3737
```
3838
3939
* **CentOS7 based image**
4040
4141
This image is available on DockerHub. To download it run:
4242
4343
```
44-
$ docker pull openshift/mysql-55-centos7
44+
$ docker pull centos/mysql-57-centos7
4545
```
4646
4747
or
4848
4949
```
50-
$ docker pull centos/mysql-56-centos7
50+
$ docker pull centos/mysql-57-centos7
5151
```
5252
5353
To build a MySQL image from scratch run:
5454
5555
```
5656
$ git clone https://github.com/openshift/mysql.git
5757
$ cd mysql
58-
$ make build VERSION=5.5
58+
$ make build TARGET=centos7 VERSION=5.7
5959
```
6060
61-
For using other versions of mysql, just replace the `5.5` value by particular version
61+
For using other versions of mysql, just replace the `5.7` value by particular version
6262
in the commands above.
6363
6464
**Notice: By omitting the `VERSION` parameter, the build/test action will be performed
@@ -72,8 +72,8 @@ Usage
7272
For information about usage of Dockerfile for MySQL 5.6,
7373
see [usage documentation](5.6/README.md).
7474
75-
For information about usage of Dockerfile for MySQL 5.5,
76-
see [usage documentation](5.5/README.md).
75+
For information about usage of Dockerfile for MySQL 5.7,
76+
see [usage documentation](5.7/README.md).
7777
7878
7979
Test
@@ -91,17 +91,17 @@ Users can choose between testing MySQL based on a RHEL or CentOS image.
9191
9292
```
9393
$ cd mysql
94-
$ make test TARGET=rhel7 VERSION=5.5
94+
$ make test TARGET=rhel7 VERSION=5.7
9595
```
9696
9797
* **CentOS based image**
9898
9999
```
100100
$ cd mysql
101-
$ make test VERSION=5.5
101+
$ make test TARGET=centos7 VERSION=5.7
102102
```
103103
104-
For using other versions of mysql, just replace the `5.5` value by particular version
104+
For using other versions of mysql, just replace the `5.7` value by particular version
105105
in the commands above.
106106
107107
**Notice: By omitting the `VERSION` parameter, the build/test action will be performed

0 commit comments

Comments
 (0)