diff --git a/app/RSpade/Commands/Migrate/Maint_Migrate.php b/app/RSpade/Commands/Migrate/Maint_Migrate.php index e9149851d..a465507a5 100644 --- a/app/RSpade/Commands/Migrate/Maint_Migrate.php +++ b/app/RSpade/Commands/Migrate/Maint_Migrate.php @@ -371,6 +371,7 @@ class Maint_Migrate extends Command // Start MySQL $this->shell_exec_privileged('mkdir -p /var/run/mysqld'); + $this->shell_exec_privileged('chown -R mysql:mysql /var/run/mysqld'); $this->shell_exec_privileged('supervisorctl start mysql 2>&1'); // Wait for MySQL to be ready @@ -482,7 +483,7 @@ class Maint_Migrate extends Command $attempt = 0; while ($attempt < $max_attempts) { - $result = shell_exec("echo \"SELECT 'test';\" | mysql -urspade -prspadepass 2>/dev/null | grep test"); + $result = shell_exec("echo \"SELECT 'test';\" | mysql -urspade -prspadepass -h 127.0.0.1 2>/dev/null | grep test"); if ($result !== null && str_contains($result, 'test')) { return;