我们可以采用类似安全模式的方法修改初始密码 先执行命令 mysqld_safe --skip-grant-tables & (设置成安全模式) &,表示在后台运行,不再后台运行的话,就再打开一个终端咯. # mysql mysql> use mysql; mysql> update user set authentication_string=password('111111') where user='root' ; (会提示修改成功query ok) mysql>…
上一篇介绍了Docker在CentOS中的安装,本文介绍如何在Docker中安装并使用mysql 1.拉取最新的mysql镜像 [root]# docker pull mysql 2.查看已有镜像 [root]#docker images REPOSITORY TAG IMAGE ID CREATED SIZEmysql latest c8ee894bd2bd 3 weeks ago 456MB 3.容器中运行mysql docker run --name mysql -e MYSQL_RO…