mysql - mysql 在 Docker/Ubuntu/Windows 上崩溃
问题描述
mysql经常崩溃
自上次 docker 升级以来,我的 mysql 出现严重问题,需要不断重新创建我的 docker 容器
有时我可以通过重新启动我的容器来解决它。
我在 mysql 日志中没有看到太多信息:
2020-04-28T21:03:06.300739Z 0 [Note] Recovering after a crash using ON
2020-04-28T21:03:06.300803Z 0 [Note] Starting crash recovery...
2020-04-28T21:03:06.300926Z 0 [Note] Crash recovery finished.
2020-04-28T21:03:06.328418Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
2020-04-28T21:03:06.328479Z 0 [Note] Skipping generation of SSL certificates as certificate files are present in data directory.
2020-04-28T21:03:06.329025Z 0 [Warning] CA certificate ca.pem is self signed.
2020-04-28T21:03:06.329073Z 0 [Note] Skipping generation of RSA key pair as key files are present in data directory.
2020-04-28T21:03:06.329313Z 0 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
2020-04-28T21:03:06.329365Z 0 [Note] - '0.0.0.0' resolves to '0.0.0.0';
2020-04-28T21:03:06.329412Z 0 [Note] Server socket created on IP: '0.0.0.0'.
2020-04-28T21:03:06.335031Z 0 [Note] Failed to start slave threads for channel ''
2020-04-28T21:03:06.341146Z 0 [Note] Event Scheduler: Loaded 0 events
2020-04-28T21:03:06.341437Z 0 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.7.29-0ubuntu0.18.04.1-log' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Ubuntu)
2020-04-28T21:03:06.614926Z 2 [Note] Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)
2020-04-28T21:03:06.638009Z 3 [Note] Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)
码头工人
docker -v
Docker version 19.03.8, build afacb8b
码头工人撰写
version: '3'
services:
ba:
image: mattrayner/lamp:latest-1804
ports:
- '127.0.0.3:80:80'
- '127.0.0.3:8080:8080'
volumes: ['./:/app']
我尝试了不同的图像,但问题仍然存在,它仅在最新的 docker 升级后才开始发生。
任何帮助将不胜感激,
附上docker日志:
Updating for 7.4
sed: -e expression #1, char 9: unknown command: `u'
=> Using an existing volume of MySQL
/usr/lib/python2.7/dist-packages/supervisor/options.py:298: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.
'Supervisord is running as root and it is searching '
2020-05-04 08:18:59,646 CRIT Supervisor running as root (no user in config file)
2020-05-04 08:18:59,646 INFO Included extra file "/etc/supervisor/conf.d/supervisord-apache2.conf" during parsing
2020-05-04 08:18:59,647 INFO Included extra file "/etc/supervisor/conf.d/supervisord-mysqld.conf" during parsing
2020-05-04 08:18:59,656 INFO RPC interface 'supervisor' initialized
2020-05-04 08:18:59,656 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2020-05-04 08:18:59,656 INFO supervisord started with pid 1
2020-05-04 08:19:00,659 INFO spawned: 'mysqld' with pid 1562
2020-05-04 08:19:00,660 INFO spawned: 'apache2' with pid 1563
2020-05-04 08:19:00,704 INFO exited: apache2 (exit status 0; not expected)
2020-05-04 08:19:00,876 INFO exited: mysqld (exit status 1; not expected)
2020-05-04 08:19:01,878 INFO spawned: 'mysqld' with pid 1959
2020-05-04 08:19:01,880 INFO spawned: 'apache2' with pid 1960
2020-05-04 08:19:01,938 INFO exited: apache2 (exit status 0; not expected)
2020-05-04 08:19:02,161 INFO exited: mysqld (exit status 1; not expected)
2020-05-04 08:19:04,165 INFO spawned: 'mysqld' with pid 2366
2020-05-04 08:19:04,166 INFO spawned: 'apache2' with pid 2369
解决方案
推荐阅读
- php - 来自数据库的 PHP 映射值
- c# - 从 Azure 管道中的 selenium 脚本下载文件的位置。以及如何将其与上传文件进行比较
- javascript - Youtube API V3 通过 URL 获取视频详情
- r - 在 shinydashboard 添加来自particle.js 的粒子
- mysql - 如何使用左连接不显示重复项
- javascript - 我无法理解这个排序功能,它工作正常并返回随机值
- r - R - 将列转换为单因素水平
- rigid-bodies - 太多的碰撞导致延迟
- android - 在 Android/MainActivity 中显示来电
- php - 有一种方法可以通过“创建”操作在授权方法(策略)中传递更多模型实例(通常不需要模型实例)