当前位置:网站首页>【Docker】Docker安装MySQL
【Docker】Docker安装MySQL
2022-08-09 06:46:00 【L-DiCaprio】
1.docker pull 安装mysql:
docker pull mysql
2.运行mysql容器:
docker run -p 3306:3306 --privileged=true -v /root/mysql/log:/var/log/mysql -v /root/mysql/data:/var/lib/mysql -v /root/mysql/conf:/etc/mysql/conf.d -e MYSQL_ROOT_PASSWORD=123456 --name mysql -d mysql:5.7
3.配置mysql配置文件,解决中文乱码:
vi /root/mysql/conf/my.conf
[client]
default_character_set=utf8
[mysql]
collation_server=utf8_general_ci
character_set_server=utf8
建库建表插入数据:
create database db01;
use db01;
create table t1(id int,name varchar(20));
insert into t1 values(1,'z3');
边栏推荐
- 一道很简答但是没答对的SQL题
- ByteDance Written Exam 2020 (Douyin E-commerce)
- makefile记录
- Import the pycharm environment package into another environment
- 长沙学院2022暑假训练赛(一)六级阅读
- golang xml 处理动态属性
- 报错jinja2.exceptions.UndefinedError: ‘form‘ is undefined
- MongDb的查询方式
- APP product source data interface (taobao, jingdong/spelling/suning/trill platform details a lot data analysis interface) code and docking tutorial
- VS2019常用快捷键
猜你喜欢
Error jinja2.exceptions.UndefinedError: 'form' is undefined
ByteDance Interview Questions: Mirror Binary Tree 2020
C# 利用iTextSharp画PDF
pycharm环境包导入到另外一个环境
Quectel EC20 4G module dial related
Flask failed to create database without error
The JVM thread state
Zero shift of leetcode
中英文说明书丨CalBioreagents 山羊抗人白蛋白,IgG组分
按图搜索1688商品接口(item_search_img-按图搜索1688商品(拍立淘接口)代码对接教程
随机推荐
Flask failed to create database without error
C# 利用iTextSharp画PDF
安装flask
Quectel EC20 4G module dial related
longest substring without repeating characters
ByteDance Interview Questions: Mirror Binary Tree 2020
细谈VR全景:数字营销时代的宠儿
P7阿里面试题2020.07 之滑动窗算法(阿里云面试)
MySQL高级特性之分布式(XA)事务的介绍
字节跳动面试题之镜像二叉树2020
先序遍历,中序遍历,后序遍历,层序遍历
Silently start over, the first page is also a new page
报错jinja2.exceptions.UndefinedError: ‘form‘ is undefined
缓存技术使用
长沙学院2022暑假训练赛(一)六级阅读
我入职阿里后,才知道原来简历这么写
Mysql实操
顺序表删除所有值为e的元素
AD的library中 库文件后缀有.intlib .schlib .pcblib 的区别
Simple Factory Pattern