当前位置:网站首页> 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内容请搜索软件开发网以前的文章或继续浏览下面的相关文章希望大家以后多多支持软件开发网!
边栏推荐
- 基于PaddlePaddle平台(EasyDL)设计的人脸识别课堂考勤系统
- 企业不想换掉用了十年的老系统
- 安全保护能力是什么意思?等保不同级别保护能力分别是怎样?
- OpenNMS分离数据库
- 监控界的最强王者,没有之一!
- [IELTS speaking] Anna's oral learning record part1
- Unified Focal loss: Generalising Dice and cross entropy-based losses to handle class imbalanced medi
- CUDA exploration
- 面试题:AOF重写机制,redis面试必问!!!
- Precise drag and drop within a contentable
猜你喜欢

让我们,从头到尾,通透网络I/O模型

European Bioinformatics Institute 2021 highlights report released: nearly 1million proteins have been predicted by alphafold

Aardio - integrate variable values into a string of text through variable names

Rust knowledge mind map XMIND

Unified Focal loss: Generalising Dice and cross entropy-based losses to handle class imbalanced medi

Enterprises do not want to replace the old system that has been used for ten years

Dayu200 experience officer homepage AITO video & Canvas drawing dashboard (ETS)

CSDN 上传图片取消自动加水印的方法

Case recommendation: An Qing works with partners to ensure that the "smart court" is more efficient

MATLAB小技巧(27)灰色预测
随机推荐
HDU 5077 NAND (violent tabulation)
Puppeter connects to the existing Chrome browser
DR-Net: dual-rotation network with feature map enhancement for medical image segmentation
Return keyword
AcWing 4300. Two operations (minimum number of BFS searches)
动作捕捉用于蛇运动分析及蛇形机器人开发
TDengine 社区问题双周精选 | 第二期
Case recommendation: An Qing works with partners to ensure that the "smart court" is more efficient
「小程序容器技术」,是噱头还是新风口?
three.js绚烂的气泡效果
(DART) usage supplement
[IELTS speaking] Anna's oral learning record part1
【全网首发】Redis系列3:高可用之主从架构的
COSCon'22 社区召集令来啦!Open the World,邀请所有社区一起拥抱开源,打开新世界~
MySQL实现字段分割一行转多行的示例代码
Slide the uniapp to a certain height and fix an element to the top effect demo (organize)
Thinkphp5 multi table associative query method join queries two database tables, and the query results are spliced and returned
QT信号和槽
(shuttle) navigation return interception: willpopscope
Sizeof keyword