Senin, 17 Mei 2021

Laravel Schema Dump Error 'mysqldump' is not recognized as an internal or external command

Error

'mysqldump' is not recognized as an internal or external command,

operable program or batch file.

Symfony\Component\Process\Exception\ProcessFailedException 

The command "mysqldump  --user="${:LARAVEL_LOAD_USER}" --password="${:LARAVEL_LOAD_PASSWORD}" --host="${:LARAVEL_LOAD_HOST}" --port="${:LARAVEL_LOAD_PORT}" --skip-add-locks --skip-comments --skip-set-charset --tz-utc "${:LARAVEL_LOAD_DATABASE}" --routines --result-file="${:LARAVEL_LOAD_PATH}" --no-data" failed.

Exit Code: 1(General error)

Working directory: D:\Web\awan

Solusi 1

Pada file config/database.php tambahkan line code 

'dump_command_path' => 'C:\xampp\mysql\bin'

C:\xampp\mysql\bin merupakan lokasi direktori mysql

Solusi 2

1. Klik search windows lalu ketikan env
2. Pilih Edit the system environment variable
3. Klik Environment variable
4. Pilih Path lalu edit
5. Klik New masukan lokasi bin mysq, kami disini
D:\xampp\mysql\bin
6. Lalu klik ok.


Load disqus comments

0 komentar