完整错误:
mysqld will log errors to /var/log/mysql/error.log
mysqld is running as pid 2636
Error: Unable to shut down server with process id 2636
dpkg: error processing package mysql-server-8.0 (--configure):
installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-server-8.0; however:
Package mysql-server-8.0 is not configured yet.
dpkg: error processing package mysql-server (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
mysql-server-8.0
mysql-server
/var/log/mysql/error.log无法看到任何错误
2023-01-08T02:46:57.117825Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/tmp' in the path is accessible to all OS users. Consider choosing a different directory.
2023-01-08T02:46:57.145582Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: /var/run/mysqld/mysqlx.sock
2023-01-08T02:46:57.145655Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.31-0ubuntu0.20.04.2' socket: '/tmp/tmp.ezuexXT3Qd/mysqld.sock' port: 0 (Ubuntu).
2023-01-08T02:46:57.167030Z 0 [System] [MY-013172] [Server] Received SHUTDOWN from user <via user signal>. Shutting down mysqld (Version: 8.0.31-0ubuntu0.20.04.2).
2023-01-08T02:46:58.725865Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.31-0ubuntu0.20.04.2) (Ubuntu).
2023-01-08T03:31:56.594254Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.31-0ubuntu0.20.04.2) starting as process 1793
2023-01-08T03:31:56.610912Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2023-01-08T03:31:56.809605Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2023-01-08T03:31:57.059550Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2023-01-08T03:31:57.059643Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2023-01-08T03:31:57.063734Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/tmp' in the path is accessible to all OS users. Consider choosing a different directory.
2023-01-08T03:31:57.113564Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.31-0ubuntu0.20.04.2' socket: '/tmp/tmp.tYo8ProTui/mysqld.sock' port: 0 (Ubuntu).
2023-01-08T03:31:57.113591Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: /var/run/mysqld/mysqlx.sock
2023-01-08T03:31:57.137926Z 0 [System] [MY-013172] [Server] Received SHUTDOWN from user <via user signal>. Shutting down mysqld (Version: 8.0.31-0ubuntu0.20.04.2).
2023-01-08T03:31:58.700360Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.31-0ubuntu0.20.04.2) (Ubuntu).
2023-01-08T03:39:47.849526Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.31-0ubuntu0.20.04.2) starting as process 2634
2023-01-08T03:39:47.866070Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2023-01-08T03:39:48.076542Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2023-01-08T03:39:48.354685Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2023-01-08T03:39:48.354750Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2023-01-08T03:39:48.358399Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/tmp' in the path is accessible to all OS users. Consider choosing a different directory.
2023-01-08T03:39:48.387186Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: /var/run/mysqld/mysqlx.sock
2023-01-08T03:39:48.387337Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.31-0ubuntu0.20.04.2' socket: '/tmp/tmp.gyZtp1Z5Ho/mysqld.sock' port: 0 (Ubuntu).
2023-01-08T03:39:48.414986Z 0 [System] [MY-013172] [Server] Received SHUTDOWN from user <via user signal>. Shutting down mysqld (Version: 8.0.31-0ubuntu0.20.04.2).
2023-01-08T03:39:50.009890Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.31-0ubuntu0.20.04.2) (Ubuntu).
我不能删除mysql-server与apt remove mysql-server
,同样的错误如上所述
1条答案
按热度按时间m1m5dgzv1#
在我的例子中,当创建容器时add --privileged=true修复了这个错误,但它会让docker容器访问主机
如果不想访问主机,使用Docker mysql镜像是更好解决方案