3

我已经创建了一个项目,我想开始使用 laravelsai 进行本地开发,但是当我启动容器时,sail up --build我在 mysql 容器中有错误,并带有以下完整输出:

merkat-db       | 2021-01-14T16:34:34.729905Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
redis_1         | 1:M 14 Jan 2021 16:34:34.340 * Running mode=standalone, port=6379.
redis_1         | 1:M 14 Jan 2021 16:34:34.340 # Server initialized
redis_1         | 1:M 14 Jan 2021 16:34:34.340 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
redis_1         | 1:M 14 Jan 2021 16:34:34.340 * Loading RDB produced by version 6.0.10
redis_1         | 1:M 14 Jan 2021 16:34:34.340 * RDB age 1236 seconds
redis_1         | 1:M 14 Jan 2021 16:34:34.340 * RDB memory usage when created 0.77 Mb
redis_1         | 1:M 14 Jan 2021 16:34:34.340 * DB loaded from disk: 0.000 seconds
redis_1         | 1:M 14 Jan 2021 16:34:34.340 * Ready to accept connections
merkat-db       | 2021-01-14T16:34:34.891168Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
merkat-app      | 2021-01-14 16:34:34,914 CRIT Supervisor is running as root.  Privileges were not dropped because no user is specified in the config file.  If you intend to run as root, you can set user=root in the config file to avoid this message.
merkat-app      | 2021-01-14 16:34:34,914 INFO Included extra file "/etc/supervisor/conf.d/supervisord.conf" during parsing
merkat-app      | 2021-01-14 16:34:34,918 INFO RPC interface 'supervisor' initialized
merkat-app      | 2021-01-14 16:34:34,918 CRIT Server 'unix_http_server' running without any HTTP authentication checking
merkat-app      | 2021-01-14 16:34:34,919 INFO supervisord started with pid 16
merkat-db       | 2021-01-14T16:34:34.974741Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
merkat-db       | 2021-01-14T16:34:35.071102Z 0 [Warning] [MY-013595] [Server] Failed to initialize TLS for channel: mysql_main. See below for the description of exact issue.
merkat-db       | 2021-01-14T16:34:35.071429Z 0 [Warning] [MY-010069] [Server] Failed to set up SSL because of the following SSL library error: SSL_CTX_set_default_verify_paths failed
merkat-db       | 2021-01-14T16:34:35.072494Z 0 [ERROR] [MY-010285] [Server] Failure to parse RSA private key (file exists): /var/lib/mysql//private_key.pem: error:0909006C:PEM routines:get_name:no start line
merkat-db       | 2021-01-14T16:34:35.073336Z 0 [ERROR] [MY-010119] [Server] Aborting
merkat-app      | 2021-01-14 16:34:35,921 INFO spawned: 'php' with pid 18
merkat-app      | Starting Laravel development server: http://0.0.0.0:80
merkat-db       | 2021-01-14T16:34:36.494723Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.22)  MySQL Community Server - GPL.
merkat-app      | [Thu Jan 14 16:34:36 2021] PHP 8.0.1 Development Server (http://0.0.0.0:80) started
merkat-db exited with code 1

错误在这一行

merkat-db       | 2021-01-14T16:34:35.071429Z 0 [Warning] [MY-010069] [Server] Failed to set up SSL because of the following SSL library error: SSL_CTX_set_default_verify_paths failed
merkat-db       | 2021-01-14T16:34:35.072494Z 0 [ERROR] [MY-010285] [Server] Failure to parse RSA private key (file exists): /var/lib/mysql//private_key.pem: error:0909006C:PEM routines:get_name:no start line

我已经尝试解决此问题的步骤:

  • 创建一个新的 private_key.pem

  • 更改mysql版本

  • 从 docker 中删除所有图像 docker system prune -a

没有任何效果。

如果我创建一个新项目,我可以连接到 MySQL,我只是不能在已经创建的项目上使用它

4

1 回答 1

9

我通过执行以下命令解决了这个问题:

docker-compose down --volumes

接着:

sail up --build

我认为容器由于某种原因已损坏

于 2021-01-18T15:06:38.980 回答