服务mysql启动失败

w8rqjzmb  于 2021-06-18  发布在  Mysql
关注(0)|答案(0)|浏览(280)

当我尝试启动时,出现了这个错误 mysqlservice mysql start 在debian机器(实际上是docker容器)下:
[失败]正在启动mysql数据库服务器:mysqld。失败!
我认为问题出在debian本身,但我会解释上下文以防万一。我有以下背景:
基于此图片的debian docker容器在ubuntu18.04主机上运行。
这个容器在以前的ubuntu16.04中运行正常,实际上仍然在另一台使用ubuntu16.04的计算机上运行。当然,容器已经在新的操作系统中重建。
如果我尝试 sh -x /etc/init.d/mysql start 为了获得一些反馈信息,我只收到如下信息:
+echo-n启动mysql数据库服务器:mysqld
启动mysql数据库服务器:mysqld+log\u daemon\u msg\u post启动mysql数据库服务器mysqld

  • :
    +mysqld\u状态检查\u alive nowarn
    +/usr/bin/mysqladmin—默认文件=/etc/mysql/debian.cnf ping
    +ping\u output=/usr/bin/mysqladmin:连接到“localhost”上的服务器失败
    错误:“无法通过套接字连接到本地mysql服务器”“/var/run/mysqld/mysqld.sock”“(2)”
    检查mysqld是否正在运行,以及套接字“/var/run/mysqld/mysqld.sock”是否存在!
    我在这件事上很受挫,我已经找了好几天了,转来转去都没有用。
    编辑:我将添加一些尝试和失败,以便获得一些输出或日志:
$/usr/bin/mysqld_safe -v

181010 15:30:51 mysqld_safe Can't log to error log and syslog at the same time.  Remove all --log-error configuration options for --syslog to take effect.
181010 15:30:51 mysqld_safe Logging to '/var/log/mysql/error.log'.
181010 15:30:51 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
181010 15:30:51 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

$mysqld --print-defaults
(empty output)

$mysqld --v
(empty output)

$tail -f /var/log/mysql/error.log
(last log entry is 1 month old)
180921 10:59:40 InnoDB: highest supported file format is Barracuda.
180921 10:59:40  InnoDB: Waiting for the background threads to start
180921 10:59:41 InnoDB: 5.5.60 started; log sequence number 1595675
ERROR: 1050  Table 'plugin' already exists
180921 10:59:41 [ERROR] Aborting

180921 10:59:41  InnoDB: Starting shutdown...
180921 10:59:42  InnoDB: Shutdown completed; log sequence number 1595675
180921 10:59:42 [Note] /usr/sbin/mysqld: Shutdown complete

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题