mysqldump:未知变量';设置gtid清除=关闭';在laravel中运行命令php artisan schema:dump时
我正在使用Laravel:8.^0。经过几次迁移后,我尝试运行mysqldump:未知变量';设置gtid清除=关闭';在laravel中运行命令php artisan schema:dump时,mysql,laravel,laravel-8,Mysql,Laravel,Laravel 8,我正在使用Laravel:8.^0。经过几次迁移后,我尝试运行phpartisanschema:dump生成一个sql文件。但是我得到了下面的错误 mysqldump: unknown variable 'column-statistics=0' mysqldump: unknown variable 'set-gtid-purged=OFF' Symfony\Component\Process\Exception\ProcessFailedException The comma
phpartisanschema:dump
生成一个sql文件。但是我得到了下面的错误
mysqldump: unknown variable 'column-statistics=0'
mysqldump: unknown variable 'set-gtid-purged=OFF'
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 --set-gtid-purged=OFF "${:LARAVEL_LOAD_DATABASE}" --routines --result-file="${:LARAVEL_LOAD_PATH}" --no-data" failed.
Exit Code: 7(Unknown error)
Working directory: D:\laravel
Output:
================
Error Output:
================
mysqldump: unknown variable 'set-gtid-purged=OFF'
at D:\laravel\vendor\symfony\process\Process.php:257
253▕ */
254▕ public function mustRun(callable $callback = null, array $env = []): self
255▕ {
256▕ if (0 !== $this->run($callback, $env)) {
➜ 257▕ throw new ProcessFailedException($this);
258▕ }
259▕
260▕ return $this;
261▕ }
1 D:\laravel\vendor\laravel\framework\src\Illuminate\Database\Schema\MySqlSchemaState.php:142e\Schema\MySqlSchemaState.php:142
Symfony\Component\Process\Process::mustRun(Object(Closure))
e\Schema\MySqlSchemaState.php:145
2 D:\laravel\vendor\laravel\framework\src\Illuminate\Databasonent\Process\Process), Object(Closure))e\Schema\MySqlSchemaState.php:145
Illuminate\Database\Schema\MySqlSchemaState::executeDumpProcess(Object(Symfony\Component\Process\Process), Object(Closure))
我使用的是docker mysql容器,其版本低于mysql
mysql 8.0.22版本,适用于x86_64上的Linux(mysql Community Server-GPL)您好,这个脚本是您编写的还是内置的?这里有相同的问题…Linux也有相同的问题,但Mac上没有问题。Mac的mysqldump版本是8.0.23版本,用于x86_64(自制)上的osx10.16,而Linux的mysqldump版本是10.16发行版10.1.48-MariaDB,对于debian Linux gnu(x86_64),您好,这个脚本是您编写的还是内置的?这里有相同的问题……Linux也有相同的问题,但Mac上没有问题。Mac的mysqldump版本是8.0.23版本,用于x86_64(自制)上的osx10.16,而Linux的mysqldump版本是10.16发行版10.1.48-MariaDB,用于debian Linux gnu(x86_64)