I have laravel 9 app using spatie laravel-backup version 8.1.7 with a MySQL 8 database.
In my database.php I have added the dump key with option useSingleTransaction as follows but the generated dumpfile is still including LOCK statements e.g. LOCK TABLES 'accreditations' WRITE;
despite all tables being innodb. Below is my configuration in database.php file.
'mysql' => [
'driver' => 'mysql',
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => '',
'strict' => false,
'engine' => 'InnoDB',
'options' => extension_loaded('pdo_mysql') ? array_filter([
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
PDO::MYSQL_ATTR_LOCAL_INFILE => true
]) : [],
'dump' => [
'useSingleTransaction' => true,
],
],
I also tried adding key 'skipLockTables' => true,
to the dump key in addition to the above but even that makes no difference?
Also tried clearing cache: php artisan config:clear
The permission I gave to the db user running the application is as follows:
GRANT ALL ON test_db.* TO 'test_user'@'%';
GRANT RELOAD ON *.* TO 'test_user'@'%';
is there something else i need to configure which i'm missing?