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

最新文章

  1. 拦截JQuery的ajax
  2. ENode 1.0 - 消息队列的设计思路
  3. android 学习随笔四(数据库存储)
  4. PCA和Softmax分类比较—Mnist与人脸数据集
  5. 对.NET中Hashtable和ArryList的理解
  6. onContextItemSelected 用法
  7. 记一次npapi插件无窗口(windowless )化下的妙巧思路然后解决问题的超爽体验过程
  8. Boost环境配置及遇到的问题解决方案
  9. 编程算法 - 有序双循环链表的插入 代码(C)
  10. html5客户端本地存储之sessionStorage及storage事件
  11. 关于 " +new Date "
  12. C语言第十次作业
  13. openresty+websocket+redis simple chat
  14. virtual box centos7 common operation
  15. Python数据类型转换函数
  16. JDK的安装及环境变量配置
  17. Unity Lighting(一)光照练习
  18. [leetcode]44. Wildcard Matching万能符匹配
  19. JavaScript 字符串与数组互转,并保持数据去重、排序功能
  20. IDEA配置SVN,Git,GitLab

热门文章

  1. 组合&多态&封装
  2. 使用Idea部署SSM项目后,访问路径为url:8080/项目名_war_exploded的解决方案
  3. Solution for automatic update of Chinese word segmentation full-text index in NEO4J
  4. spring boot 是如何加载jackson的?
  5. HBASE学习笔记(四)
  6. 在springmvc中使用requestContextListener获取全部的request对象
  7. atxserver2-rethinkdb的一些基础操作
  8. 初探html-9 链接
  9. shiro细节、默认的过滤器、匹配模式和顺序
  10. 用 C++ 模板元编程实现有限的静态 introspection