1
0
Fork 0
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:
Emi Matchu 2024-05-02 13:06:27 -07:00
parent 0943e2dbba
commit 7c09b76b5e

View file

@ -30,6 +30,9 @@ namespace :public_data do
# Don't lock the database to do it!
args << "--single-transaction"
# Skip dumping tablespaces, so this requires fewer privileges.
args << "--no-tablespaces"
# Dump the public data tables from the primary database.
args << config.fetch(:database)
args += %w(species colors zones) # manual constants