Sign inSign up

xuxuclassmate/mysql

By xuxuclassmate

•Updated over 3 years ago

MySQL database in accordance with Chinese time zone and language

Image
0

1.2K

xuxuclassmate/mysql repository overview

⁠This image is modified based on the MySQL official image 8.0.27

⁠Use method, please follow this order

⁠1、Download

docker pull xuxuclassmate/mysql

⁠2、Start Container

docker run --name mysql -d -p 3306:3306 xuxuclassmate/mysql

⁠3、Entering the container

docker exec -it mysql bash

⁠4、Log in to MySQL


mysql -uroot -p

root@123
⁠Default account : root
⁠Default Password : root@123

⁠Description

⁠1、The time zone of this version of MySQL database is East Zone 8

mysql> show variables like "%time_zone";
+------------------+--------+
| Variable_name    | Value  |
+------------------+--------+
| system_time_zone | UTC    |
| time_zone        | +08:00 |
+------------------+--------+

⁠2、Modify the character set of MySQL database to utf8mb3

mysql> SHOW VARIABLES LIKE 'character%';
+--------------------------+--------------------------------+
| Variable_name            | Value                          |
+--------------------------+--------------------------------+
| character_set_client     | utf8mb3                        |
| character_set_connection | utf8mb3                        |
| character_set_database   | utf8mb3                        |
| character_set_filesystem | binary                         |
| character_set_results    | utf8mb3                        |
| character_set_server     | utf8mb3                        |
| character_set_system     | utf8mb3                        |
| character_sets_dir       | /usr/share/mysql-8.0/charsets/ |
+--------------------------+--------------------------------+

Tag summary

Content type

Image

Digest

sha256:f04feb565…

Size

169 MB

Last updated

over 3 years ago

docker pull xuxuclassmate/mysql