Description:
docker run --restart=always --name mysqllts -e MYSQL_ROOT_PASSWORD=123456 -d mysql:lts
mysql> SHOW GLOBAL VARIABLES LIKE 'character_set_connection';
+--------------------------+---------+
| Variable_name | Value |
+--------------------------+---------+
| character_set_connection | utf8mb4 |
+--------------------------+---------+
1 row in set (0.00 sec)
mysql> SHOW SESSION VARIABLES LIKE 'character_set_connection';
+--------------------------+--------+
| Variable_name | Value |
+--------------------------+--------+
| character_set_connection | latin1 |
+--------------------------+--------+
1 row in set (0.01 sec)
How to repeat:
docker run --restart=always --name mysqllts -e MYSQL_ROOT_PASSWORD=123456 -d mysql:lts
mysql> SHOW GLOBAL VARIABLES LIKE 'character_set_connection';
+--------------------------+---------+
| Variable_name | Value |
+--------------------------+---------+
| character_set_connection | utf8mb4 |
+--------------------------+---------+
1 row in set (0.00 sec)
mysql> SHOW SESSION VARIABLES LIKE 'character_set_connection';
+--------------------------+--------+
| Variable_name | Value |
+--------------------------+--------+
| character_set_connection | latin1 |
+--------------------------+--------+
1 row in set (0.01 sec)