请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

pxc 进入容器中 对mysql进行 restart操作 整个容器直接挂掉了

1. pxc 进入容器中 对mysql进行 restart操作 整个容器直接挂掉了

2. 我pull了一个 percona server 进入容器后 对其 restart操作容器也会挂掉 这是为什么呢 ??

如果这样的话 那我想修改配置文件中的参数 岂不是没办法重启? 或者说 只能启动容器的时候 替换配置文件。。

以下是log 给老师作为参考

mysql@7471b3f9f785:/$ service mysql restart
[…] Stopping MySQL (Percona XtraDB Cluster): mysqld
[root@linux-node1 percona-server]# docker logs -f 7471b3f9f785
2018-11-05T06:40:37.845818Z 0 [Note] WSREP: MemPool(SlaveTrxHandle): hit ratio: 0, misses: 0, in use: 0, in pool: 0
2018-11-05T06:40:37.845918Z 0 [Note] WSREP: Shifting CLOSED -> DESTROYED (TO: 14)
2018-11-05T06:40:37.851766Z 0 [Note] Binlog end
2018-11-05T06:40:37.852468Z 0 [Note] Shutting down plugin 'ngram’
2018-11-05T06:40:37.852482Z 0 [Note] Shutting down plugin 'partition’
2018-11-05T06:40:37.852486Z 0 [Note] Shutting down plugin 'BLACKHOLE’
2018-11-05T06:40:37.852490Z 0 [Note] Shutting down plugin 'ARCHIVE’
2018-11-05T06:40:37.852493Z 0 [Note] Shutting down plugin 'INNODB_SYS_VIRTUAL’
2018-11-05T06:40:37.852497Z 0 [Note] Shutting down plugin 'INNODB_CHANGED_PAGES’
2018-11-05T06:40:37.852500Z 0 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES’
2018-11-05T06:40:37.852503Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES’
2018-11-05T06:40:37.852506Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS’
2018-11-05T06:40:37.852508Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN’
2018-11-05T06:40:37.852511Z 0 [Note] Shutting down plugin 'INNODB_SYS_FIELDS’
2018-11-05T06:40:37.852514Z 0 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS’
2018-11-05T06:40:37.852516Z 0 [Note] Shutting down plugin 'INNODB_SYS_INDEXES’
2018-11-05T06:40:37.852519Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS’
2018-11-05T06:40:37.852521Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLES’
2018-11-05T06:40:37.852524Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE’
2018-11-05T06:40:37.852526Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE’
2018-11-05T06:40:37.852529Z 0 [Note] Shutting down plugin 'INNODB_FT_CONFIG’
2018-11-05T06:40:37.852532Z 0 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED’
2018-11-05T06:40:37.852534Z 0 [Note] Shutting down plugin 'INNODB_FT_DELETED’
2018-11-05T06:40:37.852537Z 0 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD’
2018-11-05T06:40:37.852539Z 0 [Note] Shutting down plugin 'INNODB_METRICS’
2018-11-05T06:40:37.852542Z 0 [Note] Shutting down plugin 'INNODB_TEMP_TABLE_INFO’
2018-11-05T06:40:37.852544Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS’
2018-11-05T06:40:37.852547Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU’
2018-11-05T06:40:37.852549Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE’
2018-11-05T06:40:37.852552Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET’
2018-11-05T06:40:37.852554Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX’
2018-11-05T06:40:37.852557Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET’
2018-11-05T06:40:37.852559Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM’
2018-11-05T06:40:37.852561Z 0 [Note] Shutting down plugin 'INNODB_CMP_RESET’
2018-11-05T06:40:37.852564Z 0 [Note] Shutting down plugin 'INNODB_CMP’
2018-11-05T06:40:37.852566Z 0 [Note] Shutting down plugin 'INNODB_LOCK_WAITS’
2018-11-05T06:40:37.852569Z 0 [Note] Shutting down plugin 'INNODB_LOCKS’
2018-11-05T06:40:37.852571Z 0 [Note] Shutting down plugin 'INNODB_TRX’
2018-11-05T06:40:37.852573Z 0 [Note] Shutting down plugin 'XTRADB_ZIP_DICT_COLS’
2018-11-05T06:40:37.852576Z 0 [Note] Shutting down plugin 'XTRADB_ZIP_DICT’
2018-11-05T06:40:37.852579Z 0 [Note] Shutting down plugin 'XTRADB_RSEG’
2018-11-05T06:40:37.852581Z 0 [Note] Shutting down plugin 'XTRADB_INTERNAL_HASH_TABLES’
2018-11-05T06:40:37.852584Z 0 [Note] Shutting down plugin 'XTRADB_READ_VIEW’
2018-11-05T06:40:37.852586Z 0 [Note] Shutting down plugin 'InnoDB’
2018-11-05T06:40:37.853676Z 0 [Note] InnoDB: FTS optimize thread exiting.
2018-11-05T06:40:37.855674Z 0 [Note] InnoDB: Starting shutdown…
2018-11-05T06:40:37.955886Z 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
2018-11-05T06:40:37.957079Z 0 [Note] InnoDB: Buffer pool(s) dump completed at 181105 6:40:37
2018-11-05T06:40:38.656636Z 0 [Note] InnoDB: Waiting for page_cleaner to finish flushing of buffer pool
2018-11-05T06:40:39.668548Z 0 [Note] InnoDB: Shutdown completed; log sequence number 12192642
2018-11-05T06:40:39.668703Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2018-11-05T06:40:39.668722Z 0 [Note] Shutting down plugin 'MRG_MYISAM’
2018-11-05T06:40:39.668736Z 0 [Note] Shutting down plugin 'CSV’
2018-11-05T06:40:39.668744Z 0 [Note] Shutting down plugin 'MyISAM’
2018-11-05T06:40:39.668761Z 0 [Note] Shutting down plugin 'MEMORY’
2018-11-05T06:40:39.668768Z 0 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA’
2018-11-05T06:40:39.668818Z 0 [Note] Shutting down plugin 'sha256_password’
2018-11-05T06:40:39.668825Z 0 [Note] Shutting down plugin 'mysql_native_password’
2018-11-05T06:40:39.668830Z 0 [Note] Shutting down plugin 'wsrep’
2018-11-05T06:40:39.669074Z 0 [Note] Shutting down plugin 'binlog’
2018-11-05T06:40:39.670263Z 0 [Note] mysqld: Shutdown complete

正在回答

1回答

进入容器打开/entrypoint.sh文件,里面最后一句话是这么写的
https://img1.sycdn.imooc.com//szimg/5bdfea620001afb415000843.jpg
也就是说容器启动时候没加载配置文件,在mysqld后面加的参数信息。你想改什么东西就在配置定义一个配置文件,然后让mysqld加载配置文件即可。还有不要再容器里restart mysql,把容器停掉,然后重新启动容器。还有容器启动闪退问题,解决办法参考本课程文档部分,讲解的很清楚。

0 回复 有任何疑惑可以回复我~
  • 提问者 lairifangchang #1
    非常感谢!
    回复 有任何疑惑可以回复我~ 2018-11-05 15:55:45
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信