Skip to content

Add dbname to MySQL migration GRANT command

What does this MR do?

To check whether the MySQL database user has the correct permissions, this block is run. The first query checks if the current user is SUPER (which isn't recommended). The second query checks the information_schema.schema_privileges table for permissions.

On the line that I changed, the error message recommends running GRANT ALL PRIVILEGES ON *.* TO #{user}@'%'. This command actually inserts changes into the information_schema.user_privileges table and not the schema_privileges one. Granting all privileges on gitlabhq_production.* makes an entry into the schema_privileges table and the data migration works as expected.

What are the relevant issue numbers?

Does this MR meet the acceptance criteria?

Merge request reports