is your mariadb-box up and running? (check with docker ps or docker-compose ps)
did you start your docker-environment correctly: docker-compose up -d nginx mariadb ?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have a project that in a past computer it ran with MariaDB with laradock, now I'm trying with a new computer with all within laradock, but I can't figure it whats the problem, even with other databases I cant connect, but don't know what changed.
My laravel project .env
#####for maria db using laradock #######
DB_CONNECTION=mysql
DB_HOST=mariadb
DB_PORT=3306
DB_DATABASE=default
DB_USERNAME=root
DB_PASSWORD=root
####################### #######
My .env whitin laradock
### MARIADB ###############################################
MARIADB_VERSION=latest
MARIADB_DATABASE=default
MARIADB_USER=default
MARIADB_PASSWORD=secret
MARIADB_PORT=3306
MARIADB_ROOT_PASSWORD=root
MARIADB_ENTRYPOINT_INITDB=./mariadb/docker-entrypoint-initdb.d
my error when running php artisan migrate:fresh --seed
root@3aba6e1153bc:/var/www/simpligps-api# php artisan migrate:fresh --seed
Illuminate\Database\QueryException
SQLSTATE[HY000] [2006] MySQL server has gone away (SQL: SHOW FULL TABLES WHERE table_type = 'BASE TABLE')
at vendor/laravel/framework/src/Illuminate/Database/Connection.php:670
666| // If an exception occurs when attempting to run a query, we'll format the error
667| // message to include the bindings with SQL, which will make this exception a
668| // lot more helpful to the developer instead of just the database's errors.
669| catch (Exception $e) {
> 670| throw new QueryException(
671| $query, $this->prepareBindings($bindings), $e
672| );
673| }
674|
+48 vendor frames
Should I do any configuration?
Please or to participate in this conversation.