当前位置:网站首页>Part 3: docker installing MySQL container (custom port)
Part 3: docker installing MySQL container (custom port)
2022-04-23 13:21:00 【Da Linzi xiansen】
First step : Download mirroring
docker pull mysql:5.7
The second step : Create an instance and start
docker run -p 3306:3306 --name mysql \ -v /mydata/mysql/log:/var/log/mysql \ -v /mydata/mysql/data:/var/lib/mysql \ -v /mydata/mysql/conf:/etc/mysql \ -e MYSQL_ROOT_PASSWORD=root \ -d mysql:5.7
The third step : Get into mysql The command line interface of the container
docker exec -it mysql /bin/bash
Step four : Sign in mysql
mysql -u root -p
Step five : To configure
[client]
default-character-set=utf8
[mysql]
default-character-set=utf8
[mysqld]
init_connect='SET collation_connection = utf8_unicode_ci'
init_connect='SET NAMES utf8'
character-set-server=utf8
collation-server=utf8_unicode_ci
skip-character-set-client-handshake
skip-name-resolve
Step six : Set boot up mysql
docker update mysql --restart=always
Step seven : Turn off startup mysql
docker update mysql --restart=no
版权声明
本文为[Da Linzi xiansen]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230605322291.html
边栏推荐
- [point cloud series] pointfilter: point cloud filtering via encoder decoder modeling
- Armv8m (cortex M33) MPU actual combat
- 100 GIS practical application cases (53) - making three-dimensional image map as the base map of urban spatial pattern analysis
- Migrating your native/mobile application to Unified Plan/WebRTC 1.0 API
- Kernel error: no rule to make target 'Debian / canonical certs pem‘, needed by ‘certs/x509_ certificate_ list‘
- 2020年最新字节跳动Android开发者常见面试题及详细解析
- Summary of request and response and their ServletContext
- 十万大学生都已成为猿粉,你还在等什么?
- 【官宣】长沙软件人才实训基地成立!
- RTOS mainstream assessment
猜你喜欢
LeetCode_ DFS_ Medium_ 695. Maximum area of the island
100 GIS practical application cases (52) - how to keep the number of rows and columns consistent and aligned when cutting grids with grids in ArcGIS?
The difference between string and character array in C language
AUTOSAR from introduction to mastery lecture 100 (84) - Summary of UDS time parameters
Esp32 vhci architecture sets scan mode for traditional Bluetooth, so that the device can be searched
CMSIS cm3 source code annotation
nodeJs + websocket 循环小案例
UEFI learning 01-arm aarch64 compilation, armplatformpripeicore (SEC)
2020年最新字节跳动Android开发者常见面试题及详细解析
How to build a line of code with M4 qprotex
随机推荐
Melt reshape decast long data short data length conversion data cleaning row column conversion
AUTOSAR from introduction to mastery 100 lectures (52) - diagnosis and communication management function unit
“湘见”技术沙龙 | 程序员&CSDN的进阶之路
100000 college students have become ape powder. What are you waiting for?
Servlet of three web components
Analysis of the latest Android high frequency interview questions in 2020 (BAT TMD JD Xiaomi)
5道刁钻的Activity生命周期面试题,学完去吊打面试官!
鸿蒙系统是抄袭?还是未来?3分钟听完就懂的专业讲解
Ding ~ your scholarship has arrived! C certified enterprise scholarship list released
Data warehouse - what is OLAP
9419 page analysis of the latest first-line Internet Android interview questions
[point cloud series] Introduction to scene recognition
mui + hbuilder + h5api模拟弹出支付样式
[point cloud series] full revolutionary geometric features
filter()遍历Array异常友好
Feature Engineering of interview summary
「玩转Lighthouse」轻量应用服务器自建DNS解析服务器
MySQL 8.0.11下载、安装和使用可视化工具连接教程
【快排】215. 数组中的第K个最大元素
[point cloud series] learning representations and generative models for 3D point clouds