惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

W
WeLiveSecurity
T
Tenable Blog
Project Zero
Project Zero
C
Cybersecurity and Infrastructure Security Agency CISA
T
The Exploit Database - CXSecurity.com
P
Palo Alto Networks Blog
S
Schneier on Security
Scott Helme
Scott Helme
S
Securelist
Know Your Adversary
Know Your Adversary
Vercel News
Vercel News
IT之家
IT之家
V
V2EX
F
Fortinet All Blogs
Simon Willison's Weblog
Simon Willison's Weblog
K
Kaspersky official blog
博客园_首页
T
Tailwind CSS Blog
The GitHub Blog
The GitHub Blog
Spread Privacy
Spread Privacy
Microsoft Security Blog
Microsoft Security Blog
Cisco Talos Blog
Cisco Talos Blog
The Register - Security
The Register - Security
有赞技术团队
有赞技术团队
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Cyberwarzone
Cyberwarzone
Google DeepMind News
Google DeepMind News
The Hacker News
The Hacker News
L
LINUX DO - 热门话题
Hugging Face - Blog
Hugging Face - Blog
博客园 - 三生石上(FineUI控件)
A
Arctic Wolf
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
C
CXSECURITY Database RSS Feed - CXSecurity.com
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
T
Threat Research - Cisco Blogs
P
Proofpoint News Feed
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
P
Privacy & Cybersecurity Law Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
CERT Recently Published Vulnerability Notes
S
SegmentFault 最新的问题
AWS News Blog
AWS News Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
罗磊的独立博客
Apple Machine Learning Research
Apple Machine Learning Research
P
Proofpoint News Feed
The Cloudflare Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
Vulnerabilities – Threatpost

博客园 - netcorner

docker 启动报错 library initialization failed - unable to allocate file descriptor table - out of memory docker容器访问上层宿主主机的方式 svn: Server SSL certificate verification failed certificate issued for a different hostname springboot 参数校验 windows批处理 打开exe后关闭cmd 分页得到查询总数的方法 mysql input[type="file"] change事件第二次不触发 小程序post请求,后台接收不到数据的解决方法 Docker安装Kibana Docker安装ElasticSearch Docker安装Redis Docker安装Tomcat Docker安装 Nginx mysql服务设置远程连接 解决1251 client does not support ..问题 安装Docker 图形界面管理工具 -- Portainer Dockfile 编写示例(将 jar 制作成容器) Docker 常用命令集 云服务器CentOS安装Docker CentOS7离线安装Docker
Docker 安装MySQL容器
netcorner · 2021-02-15 · via 博客园 - netcorner

1.拉取MySQL镜像

2.创建并启动一个MySQL容器

docker run --name mysql --restart=always -v /home/mysql:/var/lib/mysql -v /etc/localtime:/etc/localtime:ro -e MYSQL_ROOT_PASSWORD=123456x -e TZ=Asia/Shanghai -p 3306:3306 -d mysql3306:3306 -d mysql

注:

镜像链接: https://pan.baidu.com/s/1XqaJfE70i2UbBb_0QM0OHg 提取码: xsqc 

不指定mysql数据文件存储位置/var/lib/docker/volumes/{containerid}/_data

如:/var/lib/docker/volumes/58a3726589d0cee60b97a1fe97505d6d475398c5f7d773217c3f0ca891b13fce/_data

进入 mysql 容器命令行容器:docker exec -it mysql /bin/bash

本地连接 mysql:mysql -u root -p

关于有些工具无法连上 mysql 8 的解决方法

查看用户信息

修改用户密码

修改时区

> set global time_zone = '+8:00'; ##修改mysql全局时区为北京时间,即我们所在的东8区

> set time_zone = '+8:00'; ##修改当前会话时区

> flush privileges; #立即生效

参考:

https://www.cnblogs.com/feipeng8848/p/10470655.html