mysql Not Found in Docker Image #253

Closed
opened 2026-02-05 17:20:36 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @Morpheus636 on GitHub (Feb 10, 2025).

Current Behavior

When running the docker image with the DB_CONNECTION set to mysql, laravel fails to connect to the database to apply migrations because no mysql client is installed in the image.

Expected Behavior

The panel should connect using an installed mysql client to apply the schema.

Steps to Reproduce

  1. Run the panel docker image with the environment variable DB_CONNECTION: mysql set and the database connection settings pointing to an empty database.
  2. See docker logs for the container.

Panel Version

v1.0.0-beta17

Wings Version

N/A

Games and/or Eggs Affected

N/A

Docker Image

N/A

Error Logs

INFO  Loading stored database schemas.  

  database/schema/mysql-schema.sql ................................... 1s FAIL

In Process.php line 269:
                                                                               
  The command "mysql  --user="${:LARAVEL_LOAD_USER}" --password="${:LARAVEL_L  
  OAD_PASSWORD}" --host="${:LARAVEL_LOAD_HOST}" --port="${:LARAVEL_LOAD_PORT}  
  " --database="${:LARAVEL_LOAD_DATABASE}" < "${:LARAVEL_LOAD_PATH}"" failed.  
                                                                               
  Exit Code: 127(Command not found)                                            
                                                                               
  Working directory: /var/www/html                                             
                                                                               
  Output:                                                                      
  ================                                                             
                                                                               
                                                                               
  Error Output:                                                                
  ================                                                             
  sh: mysql: not found

Is there an existing issue for this?

  • I have searched the existing issues before opening this issue.
  • I have provided all relevant details, including the specific game and Docker images I am using if this issue is related to running a server.
  • I have checked in the Discord server and believe this is a bug with the software, and not a configuration issue with my specific system.
Originally created by @Morpheus636 on GitHub (Feb 10, 2025). ### Current Behavior When running the docker image with the `DB_CONNECTION` set to `mysql,` laravel fails to connect to the database to apply migrations because no mysql client is installed in the image. ### Expected Behavior The panel should connect using an installed mysql client to apply the schema. ### Steps to Reproduce 1. Run the panel docker image with the environment variable `DB_CONNECTION: mysql` set and the database connection settings pointing to an empty database. 2. See `docker logs` for the container. ### Panel Version v1.0.0-beta17 ### Wings Version N/A ### Games and/or Eggs Affected N/A ### Docker Image N/A ### Error Logs ```bash INFO Loading stored database schemas. database/schema/mysql-schema.sql ................................... 1s FAIL In Process.php line 269: The command "mysql --user="${:LARAVEL_LOAD_USER}" --password="${:LARAVEL_L OAD_PASSWORD}" --host="${:LARAVEL_LOAD_HOST}" --port="${:LARAVEL_LOAD_PORT} " --database="${:LARAVEL_LOAD_DATABASE}" < "${:LARAVEL_LOAD_PATH}"" failed. Exit Code: 127(Command not found) Working directory: /var/www/html Output: ================ Error Output: ================ sh: mysql: not found ``` ### Is there an existing issue for this? - [x] I have searched the existing issues before opening this issue. - [x] I have provided all relevant details, including the specific game and Docker images I am using if this issue is related to running a server. - [x] I have checked in the Discord server and believe this is a bug with the software, and not a configuration issue with my specific system.
Author
Owner

@Morpheus636 commented on GitHub (Feb 10, 2025):

Alternative solution seems to be removing database/schema/mysql-schema.sql. The same error message gets printed but it goes on to apply the migrations instead of crashing out.

@Morpheus636 commented on GitHub (Feb 10, 2025): Alternative solution seems to be removing `database/schema/mysql-schema.sql`. The same error message gets printed but it goes on to apply the migrations instead of crashing out.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/panel-pelican-dev#253