Google Cloud SQL permission check error · Issue #1572 · github/gh-ost · GitHub
Skip to content

Google Cloud SQL permission check error #1572

Open

Description

@suyanhj

I have granted the relevant permissions to my user, but when executing, I still get a permission error

Image

The authorized permissions are as follows

Image

Activity

  1. soepic1 commented on Jul 30, 2026

    @soepic1
    Contributor

    Hi @suyanhj ,

    This error happens on GCP Cloud SQL because gh-ost validates privileges before starting the migration.

    When running with -gcp=true and -assume-rbr, gh-ost bypasses the check for the SUPER privilege (which GCP Cloud SQL does not grant to users). However, it still explicitly requires:

    1. REPLICATION CLIENT and REPLICATION SLAVE on global scope (*.*)
    2. ALL PRIVILEGES on the specific target database schema (paynow-interior.*)

    On Cloud SQL, default admin/root accounts often lack REPLICATION SLAVE or explicit database-level grants for newly created schemas.

    Solution
    Connect to your Cloud SQL instance via your MySQL client and execute the following:

    sql
    -- 1. Grant global replication streaming privileges
    GRANT REPLICATION CLIENT, REPLICATION SLAVE ON . TO 'root'@'%';

    -- 2. Grant full database privileges on target database
    GRANT ALL PRIVILEGES ON paynow-interior.* TO 'root'@'%';

    -- 3. Flush privileges
    FLUSH PRIVILEGES;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions