我在docker容器中安装了Mysql,能运行,当我将它commit为新镜像后,运行新容器MySql无法运行。查看日志报错为:

Can't open and lock privilege tables: Table storage engine for 'user'

  将datadir路径下的文件清空,然后执行如下命令:mysqld --initialize --user=mysql --basedir=/usr --datadir=/var/lib/mysql

  然后重启:service mysql start  

  MySql启动成功。

 

相关文章:

  • 2021-11-28
  • 2021-04-28
  • 2022-12-23
  • 2021-12-29
  • 2022-12-23
  • 2022-12-23
  • 2022-02-09
  • 2021-12-21
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-22
  • 2021-11-07
  • 2022-12-23
  • 2022-02-03
相关资源
相似解决方案