From 7c09b76b5e6cec491fc99ddd796c5109dc94f8d5 Mon Sep 17 00:00:00 2001 From: Matchu Date: Thu, 2 May 2024 13:06:27 -0700 Subject: [PATCH] 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 --- lib/tasks/public_data.rake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/tasks/public_data.rake b/lib/tasks/public_data.rake index 2b68c77e..6ae2541f 100644 --- a/lib/tasks/public_data.rake +++ b/lib/tasks/public_data.rake @@ -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