Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

General error : 'mysqldump' is not recognized as an internal or external command

I'm trying to backup from my Laravel application using Spatie package but when running backup:run commend I get this error:

Backup failed because The dump process failed with exitcode 1 : General error : 'mysqldump' is not recognized as an internal or external command,
operable program or batch file.

How do I solve this on localhost and production?

like image 559
Rastagar Avatar asked Feb 07 '23 16:02

Rastagar


1 Answers

In your config/database.php file, edit the mysql database config and add:

'dump' => [
               'dump_binary_path' => 'C:/xampp/mysql/bin/', // only the path, so without `mysqldump` or `pg_dump`
               'use_single_transaction',
               'timeout' => 60 * 5, // 5 minute timeout
            ],
like image 150
Dang Cao Avatar answered Apr 28 '23 00:04

Dang Cao