In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
When starting MySQL service with MySQL image, we often encounter the problem of time zone and character set. This article will reconstruct MySQL image in the form of Dockerfile to solve this problem completely.
1. Pull the official image docker pull mysql:5.7.172. Create dockerfilemkdir mysqldbcd mysqldbvi Dockerfile
Build a Dockerfile file with the following contents:
FROM mysql:5.7.17MAINTAINER wangRUN ln-sf / usr/share/zoneinfo/Asia/Shanghai / etc/localtimeENV LANG=C.UTF-83. Rebuild the image
Execute in the same directory as the Dockerfile file:
Docker build-t mysqldb:5.7.17.
There is one last order. Represents the current directory
After the build is complete, check the image using docker images
Next, use the docker run command to start the container to verify that the time zone and character set are correct
Docker run-- name mysqldb-e MYSQL_ROOT_PASSWORD=yourpass-d mysqldb:5.7.17
You are welcome to follow my official account and communicate with me.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.