修改docker下mysql配置
2024-09-28 13:00:41
1.在/home/smile/docker/mysql/config/目录下增加一个文件 my.cnf
# Copyright (c) , Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., Franklin St, Fifth Floor, Boston, MA - USA !includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mysql.conf.d/ [mysqld]
sql_mode='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'
lower_case_table_names=
2.删除原有的容器,新建一个
docker stop mysql
docker rm mysql
cd /home/smile/docker/mysql
docker run -p : --name mysql -v $PWD/conf/my.cnf:/etc/mysql/my.cnf -v $PWD/logs:/logs -v $PWD/data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD= -d mysql:5.7
最新文章
- 拦截JQuery的ajax
- ENode 1.0 - 消息队列的设计思路
- android 学习随笔四(数据库存储)
- PCA和Softmax分类比较—Mnist与人脸数据集
- 对.NET中Hashtable和ArryList的理解
- onContextItemSelected 用法
- 记一次npapi插件无窗口(windowless )化下的妙巧思路然后解决问题的超爽体验过程
- Boost环境配置及遇到的问题解决方案
- 编程算法 - 有序双循环链表的插入 代码(C)
- html5客户端本地存储之sessionStorage及storage事件
- 关于 "; +new Date ";
- C语言第十次作业
- openresty+websocket+redis simple chat
- virtual box centos7 common operation
- Python数据类型转换函数
- JDK的安装及环境变量配置
- Unity Lighting(一)光照练习
- [leetcode]44. Wildcard Matching万能符匹配
- JavaScript 字符串与数组互转,并保持数据去重、排序功能
- IDEA配置SVN,Git,GitLab
热门文章
- 组合&;多态&;封装
- 使用Idea部署SSM项目后,访问路径为url:8080/项目名_war_exploded的解决方案
- Solution for automatic update of Chinese word segmentation full-text index in NEO4J
- spring boot 是如何加载jackson的?
- HBASE学习笔记(四)
- 在springmvc中使用requestContextListener获取全部的request对象
- atxserver2-rethinkdb的一些基础操作
- 初探html-9 链接
- shiro细节、默认的过滤器、匹配模式和顺序
- 用 C++ 模板元编程实现有限的静态 introspection