Open prosto-username opened 1 year ago
I am also facing the same issue for db migration using laravel-zero-downtime-migration which is using gh-ost
service.
I am on MariaDB version 10.11
on AWS RDS and getting the same error for the database migration that REPLICATION CLIENT user privileges are required. After research I came to the conclusion that REPLICATION CLIENT is now renamed to BINLOG MONITOR
Please add support to BINLOG MONITOR
for higher version.
@prosto-username were you able to resolve this, or do any work around for it?
I'm having trouble connecting gh-ost to a MariaDB 10.6.12 database hosted on AWS RDS. The problem is that in this version of the database, the REPLICATION CLIENT privilege has been changed.
Steps to reproduce the error: Grant user priveleges
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, PROCESS, REFERENCES, INDEX, ALTER, SHOW DATABASES, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION CLIENT, REPLICATION SLAVE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER ON *.* TO 'user'@'%' WITH GRANT OPTION;
SHOW GRANTS FOR user
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, PROCESS, REFERENCES, INDEX, ALTER, SHOW DATABASES, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, SLAVE MONITOR ON *.* TO
user@
%``Example gh-ost command
gh-ost \ --debug \ --max-load=Threads_running=25 \ --critical-load=Threads_running=1000 \ --chunk-size=1000 \ --throttle-control-replicas="ghost-test-replica.cjb7hsfgjye0.us-east-1.rds.amazonaws.com" \ --max-lag-millis=1500 \ --user="user" \ --password="password" \ --host="ghost-test.cjb7hsfgjye0.us-east-1.rds.amazonaws.com" \ --allow-on-master \ --database="schema" \ --table="table" \ --verbose \ --alter="ADD COLUMN x INT NOT NULL DEFAULT '0'" \ --allow-master-master \ --cut-over=default \ --assume-rbr \ --exact-rowcount \ --concurrent-rowcount \ --default-retries=120 \ --panic-flag-file=/tmp/ghost.panic.flag \ --postpone-cut-over-flag-file=/tmp/ghost.postpone.flag \ [--execute]
Output
INFO starting gh-ost 1.1.5 INFO Migrating
schema.
tableINFO inspector connection validated on ghost-test.cjb7hgicdye0.us-east-1.rds.amazonaws.com:3306 DEBUG Privileges: Super: false, REPLICATION CLIENT: false, REPLICATION SLAVE: true, ALL on *.*: false, ALL on
schema.*: true ERROR User has insufficient privileges for migration. Needed: SUPER|REPLICATION CLIENT, REPLICATION SLAVE and ALL on
schema.*
Is migration supported for MariaDB 10.6 or will this feature be implemented in the future?