forked from OpenNeo/impress
Require fewer db privileges to run public_data:commit
In newer versions of MySQL, `mysqldump`'s default behavior requires accessing some privileged `INFORMATION_SCHEMA` tables, which requires the global `PROCESS` permission. Rather than require that, we can just skip this step, by adding the `--no-tablespaces` argument. This was the guidance I found when looking up this issue! https://dba.stackexchange.com/a/274460/289961
This commit is contained in:
parent
0943e2dbba
commit
7c09b76b5e
1 changed files with 3 additions and 0 deletions
|
@ -30,6 +30,9 @@ namespace :public_data do
|
||||||
# Don't lock the database to do it!
|
# Don't lock the database to do it!
|
||||||
args << "--single-transaction"
|
args << "--single-transaction"
|
||||||
|
|
||||||
|
# Skip dumping tablespaces, so this requires fewer privileges.
|
||||||
|
args << "--no-tablespaces"
|
||||||
|
|
||||||
# Dump the public data tables from the primary database.
|
# Dump the public data tables from the primary database.
|
||||||
args << config.fetch(:database)
|
args << config.fetch(:database)
|
||||||
args += %w(species colors zones) # manual constants
|
args += %w(species colors zones) # manual constants
|
||||||
|
|
Loading…
Reference in a new issue