From 3502cf1af1167367908bb0823dd3cda177a30de8 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 23 Dec 2025 20:38:36 +0000 Subject: [PATCH] Ensure MySQL socket directory exists with proper permissions before start MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- app/RSpade/Commands/Migrate/Migrate_Begin_Command.php | 1 + app/RSpade/Commands/Migrate/Migrate_Rollback_Command.php | 1 + 2 files changed, 2 insertions(+) diff --git a/app/RSpade/Commands/Migrate/Migrate_Begin_Command.php b/app/RSpade/Commands/Migrate/Migrate_Begin_Command.php index 4a1498802..722f49932 100755 --- a/app/RSpade/Commands/Migrate/Migrate_Begin_Command.php +++ b/app/RSpade/Commands/Migrate/Migrate_Begin_Command.php @@ -86,6 +86,7 @@ class Migrate_Begin_Command extends Command // Step 4: Start MySQL again using supervisorctl $this->info('[4] Starting MySQL server...'); + $this->shell_exec_privileged('mkdir -p /var/run/mysqld && chmod 777 /var/run/mysqld'); $this->shell_exec_privileged('supervisorctl start mysql 2>&1'); // Step 5: Wait for MySQL to be ready diff --git a/app/RSpade/Commands/Migrate/Migrate_Rollback_Command.php b/app/RSpade/Commands/Migrate/Migrate_Rollback_Command.php index 7ab1d2648..da6dee244 100755 --- a/app/RSpade/Commands/Migrate/Migrate_Rollback_Command.php +++ b/app/RSpade/Commands/Migrate/Migrate_Rollback_Command.php @@ -65,6 +65,7 @@ class Migrate_Rollback_Command extends Command // Step 5: Start MySQL using supervisorctl $this->info('[5] Starting MySQL server...'); + $this->shell_exec_privileged('mkdir -p /var/run/mysqld && chmod 777 /var/run/mysqld'); $this->shell_exec_privileged('supervisorctl start mysql 2>&1'); // Step 6: Wait for MySQL to be ready