I'm currently working with Laravel and came across a strange issue, though I could not find any answer to it.
When I install Laravel (Jetstream) on Docker with NGINX (Latest), PHP-FPM (PHP 8) and MariaDB 10.5, everything works as expected and I can run all migrations.
As soon as I switch to MariaDB 10.6 I get
SQLSTATE[HY000] [2002] Connection refused (SQL: alter table `team_invitations` add unique `team_invitations_team_id_email_unique`(`team_id`, `email`))
Strangely all table creations work as expected.
This is the migration part where it comes from:
Schema::create('team_invitations', function (Blueprint $table) {
$table->id();
$table->foreignId('team_id')->constrained()->cascadeOnDelete();
$table->string('email');
$table->string('role')->nullable();
$table->timestamps();
$table->unique(['team_id', 'email']);
});
Does anyone have an idea where this comes from/what the solution could be?
The stack trace shows me correct network / database settings.
Also running the query manually works as expected.