Mysql
Tue, Jan 18, 2022
閱讀時間 1 分鐘
mysql
docker run --name mysql -e MYSQL_ROOT_PASSWORD=123456 -dp 3306:3306 mysql/mysql-server --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --skip-character-set-client-handshake
等於
[client]
default-character-set=utf8mb4
[mysql]
default-character-set=utf8mb4
[mysqld]
collation-server = utf8mb4_unicode_ci
character-set-server = utf8mb4
docker exec -it mysql /bin/bash -c "mysql -uroot -p123456"