Laravel - mysqldump: 无法执行 'SELECT COLUMN_NAME, JSON_EXTRACT(HISTOGRAM, '$."number-of-buckets-speci



突然间,spatien/laravel-backup开始给出问题Unknown table 'COLUMN_STATISTICS'

我使用laradock (docker for laravel) - mariadb

我已经尝试添加到my.cnf

[mysqldump]
column-statistics=0

作为参考,我的设置是tris https://github.com/laradock/laradock/tree/master/mariadb

我该如何修复它?

您需要在config/database.php中禁用——column-statistics=0而不是在my.conf

//config/database.php
'connections' => [
'mysql' => [
'driver'    => 'mysql'
...,
'dump' => [
'dump_binary_path' => '/path/to/the/binary', // only the path, so without `mysqldump` or `pg_dump`
'use_single_transaction',
'timeout' => 60 * 5, // 5 minute timeout
'exclude_tables' => ['table1', 'table2'],
'add_extra_option' => '--column_statistics=0', // for example '--column_statistics=0'
]
],
];

参考- https://spatie.be/docs/laravel-backup/v7/installation-and-setup

最新更新