当前位置:网站首页> docker启动mysql及-eMYSQL_ROOT_PASSWORD=my-secret-pw问题解决
docker启动mysql及-eMYSQL_ROOT_PASSWORD=my-secret-pw问题解决
2022-07-06 15:38:00 【1024问】
一、问题描述
二、解决
一、问题描述今天用kitematic安装了最新版的mysql,自动启动报没设置密码错误
error: database is uninitialized and password option is not specified
You need to specify one of MYSQL_ROOT_PASSWORD, MYSQL_ALLOW_EMPTY_PASSWORD and MYSQL_RANDOM_ROOT_PASSWORD
截图如下:

错误提示很明显
“数据库未初始化,密码没设置。你需要设置MYSQL_ROOT_PASSWORD, MYSQL_ALLOW_EMPTY_PASSWORD and MYSQL_RANDOM_ROOT_PASSWORD三个中的任意一项”
其中 MYSQL_ROOT_PASSWORD即root账户的密码。
MYSQL_ALLOW_EMPTY_PASSWORD即允许密码为空。
MYSQL_RANDOM_ROOT_PASSWORD随机一个root账户密码。
二、解决设置端口信息

我们通过环境变量设置root密码

环境变量这里 新增一项
MYSQL_ROOT_PASSWORD 然后右侧输入密码
然后 “save”后mysql重启正常

然后通过navcat连接,发现一切OK

或者用命令行运行
docker run -d -P -e MYSQL_ROOT_PASSWORD=root mysql到此这篇关于docker启动mysql及-e MYSQL_ROOT_PASSWORD=my-secret-pw问题解决的文章就介绍到这了,更多相关docker启动mysql内容请搜索软件开发网以前的文章或继续浏览下面的相关文章希望大家以后多多支持软件开发网!
边栏推荐
- ICLR 2022 | 基于对抗自注意力机制的预训练语言模型
- MATLAB小技巧(27)灰色预测
- Detailed explanation of ThreadLocal
- Unified Focal loss: Generalising Dice and cross entropy-based losses to handle class imbalanced medi
- [untitled]
- Is there any requirement for the value after the case keyword?
- 动作捕捉用于蛇运动分析及蛇形机器人开发
- How big is the empty structure?
- Enterprises do not want to replace the old system that has been used for ten years
- Signed and unsigned keywords
猜你喜欢

rust知识思维导图xmind

Aardio - construct a multi button component with customplus library +plus

Balanced Multimodal Learning via On-the-fly Gradient Modulation(CVPR2022 oral)

Designed for decision tree, the National University of Singapore and Tsinghua University jointly proposed a fast and safe federal learning system

COSCon'22 社区召集令来啦!Open the World,邀请所有社区一起拥抱开源,打开新世界~

机试刷题1

(flutter2) as import old project error: inheritfromwidgetofexacttype

【全网首发】Redis系列3:高可用之主从架构的

视图(view)

监控界的最强王者,没有之一!
随机推荐
Case recommendation: An Qing works with partners to ensure that the "smart court" is more efficient
Windows Auzre 微软的云计算产品的后台操作界面
How to confirm the storage mode of the current system by program?
Improving Multimodal Accuracy Through Modality Pre-training and Attention
石墨文档:4大对策解决企业文件信息安全问题
Flutter life cycle
Signed and unsigned keywords
Slide the uniapp to a certain height and fix an element to the top effect demo (organize)
前置机是什么意思?主要作用是什么?与堡垒机有什么区别?
关于声子和热输运计算中BORN电荷和non-analytic修正的问题
Sizeof keyword
企业不想换掉用了十年的老系统
Unified Focal loss: Generalising Dice and cross entropy-based losses to handle class imbalanced medi
浅谈网络安全之文件上传
dockermysql修改root账号密码并赋予权限
Volatile keyword
Cocoscreator+typescripts write an object pool by themselves
ICLR 2022 | pre training language model based on anti self attention mechanism
树的先序中序后序遍历
Aardio - integrate variable values into a string of text through variable names