簡體   English   中英

Laravel Sail Mysql 8.0 現有項目的問題

[英]Laravel Sail Mysql 8.0 problem on existing project

我已經創建了一個項目,我想開始使用 laravelsai 進行本地開發,但是當我使用sails sail up --build啟動容器時,我在mysql 容器中出現錯誤,並帶有以下完整的Z78E6221F6393D145668Z1DB398:

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 system prune -a從 docker 中刪除所有圖像

沒有任何效果。

如果我創建一個新項目,我可以連接到 MySQL,但我不能在已經創建的項目上使用它

我通過執行以下命令解決了這個問題:

docker-compose down --volumes

接着:

sail up --build

我認為容器由於某種原因已損壞

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM