mysql - mysqldump:运行命令 php artisan schema:dump 时,laravel 中的未知变量“set-gtid-purged=OFF”
问题描述
我正在使用 Laravel:8.^0。经过几次迁移后,我尝试运行php artisan schema: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))
我正在使用低于 mysql 版本的 docker mysql 容器
mysql Ver 8.0.22 for Linux on x86_64 (MySQL Community Server - GPL)
解决方案
推荐阅读
- imagej - 测量多个 ROI 的水平长度
- javascript - 与路由器一起使用时反应面包屑抛出错误
- apache-spark - 使用 pyspark 如何拒绝来自 csv 文件的错误(格式错误)记录并将这些拒绝的记录保存在新文件中
- angular - Firebase / Angular 7 重写规则
- c# - 以编程方式添加的 LinkLabel 不可见
- c# - 无法在 C# 中设置授权标头
- gitlab - 在 GitLab CI 中仅结合计划和分支
- java - Eclipse RCP 应用程序 - 应用程序在自动最大化到窗口大小之前以一个小窗口启动
- c# - 在 Parallel.ForEach 中使用锁定的正确方法是什么?
- r - 如何删除R数据框中的部分列标题