The user uploaded a SQL file to a MariaDB container using Docker Compose. After verifying the import by checking tables, they removed the import line and restarted the container, resulting in an empty database. The Laravel application configuration shows expected database credentials, but these need to be checked against the running Docker environment. The deletion of the SQL import line was critical, as it prevented initial data loading, leading to data loss on database restart.
When you deleted the line importing file.sql from the Docker configuration, it prevented the database from initializing with that data again, leading to an empty database.
In the Laravel configuration file for databases, the expected configuration variables like DB_DATABASE and DB_USERNAME should match the values set in your Docker environment.
Collection
[
|
...
]