V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
Graves
V2EX  ›  问与答

docker 启动不了 mysql 容器,求助各位

  •  
  •   Graves · 2019-04-28 15:33:11 +08:00 · 5649 次点击
    这是一个创建于 1796 天前的主题,其中的信息可能已经有所发展或是发生改变。
    docker pa -a 查看了一下,8 weeks ago 创建的一个 mysql 容器,并且跑起来,直到中午容器挂掉了。
    然后看了一下容器日志
    ERROR: mysqld failed while attempting to check config
    command was: "mysqld --verbose --help"
    2019-04-28T07:12:20.708036Z 0 [ERROR] unknown variable 'symbolic-link=0'
    2019-04-28T07:12:20.789256Z 0 [ERROR] Aborting
    看了下报错信息,是配置出错了,但是现在容器启动不起来,不能进去容器改配置。
    虽然是测试用的服务器,但是里面的数据还是有用的,有一些表结构还没来得及备份
    10 条回复    2019-04-29 07:54:17 +08:00
    Graves
        1
    Graves  
    OP
       2019-04-28 15:36:12 +08:00
    之前偷懒,没有在宿主机创建配置文件然后挂载给容器。但是按理来说一开始容器应该就启动不了,我也没去改过容器配置,现在容器突然就启不来,有点 想不通
    kimqcn
        2
    kimqcn  
       2019-04-28 15:42:46 +08:00
    估计是不小心把配置文件改错了。可以 docker cp 把容器里的文件拷贝出来改好再放回去。
    mahone3297
        3
    mahone3297  
       2019-04-28 15:43:22 +08:00
    只要数据不在容器中,可以新起一个 mysql 进程,去 mount 吧
    CallMeReznov
        4
    CallMeReznov  
       2019-04-28 15:44:00 +08:00
    你不会数据文件直接在写 DOCKER 里面吧?
    现在容器多大了??? 用的非 ubuntu?
    Graves
        5
    Graves  
    OP
       2019-04-28 15:47:35 +08:00
    @mahone3297
    @CallMeReznov
    数据是在容器里面[手动狗头],数据量也不是很大的,系统是 centos
    Graves
        6
    Graves  
    OP
       2019-04-28 15:48:37 +08:00
    @kimqcn 现在是容器起不来,我也不知道配置在哪个目录,没法进去找
    Graves
        7
    Graves  
    OP
       2019-04-28 15:51:03 +08:00
    哎,还是不能偷懒啊
    Graves
        8
    Graves  
    OP
       2019-04-28 16:14:04 +08:00
    To recover your lost Database and avoid leaking it: Send us 0.1 Bitcoin (BTC) to our Bitcoin address 1J6jLduCXbPyxt5EMTs7iHwdafANy4ThJc and contact us by Email with your Server IP or Domain name and a Proof of Payment. If you are unsure if we have your data, contact us and we will send you a proof. Your Database is downloaded and backed up on our servers. Backups that we have right now: test1, test2, ApolloPortalDB, dev, ApolloConfigDB . If we dont receive your payment in the next 10 Days, we will make your database public or use them otherwise.
    原来是被黑了
    Graves
        9
    Graves  
    OP
       2019-04-28 16:15:54 +08:00
    @kimqcn 用你的方法,cp 出来改完配置再放回去,可以启动容器,但是发现数据表被删了,然后记录里面有勒索 BTC 的信息
    chinesestudio
        10
    chinesestudio  
       2019-04-29 07:54:17 +08:00 via Android
    直接重建服务器吧 要不三天两头被黑
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1001 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 22:18 · PVG 06:18 · LAX 15:18 · JFK 18:18
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.