0

I'm trying to migrate from an EC2 mysql(percona galera) to rds mysql but I'm running into some issues. The initial import works great but after that I'm hitting an issue when trying to apply the remaining binarylogs.

Command to create binlog sql:

mysqlbinlog /var/lib/mysql/binary-logs.000027 --start-position=354567 > /var/lib/mysql/backup/binlog.sql`

Output of import command:

mysql -u mysqluser -p -h mysqlmasked.cfdaddadacsabil.us-east-1.rds.amazonaws.com -e "source binlog.sql"
Enter password:

ERROR 1227 (42000) at line 9 in file: 'binlog.sql': Access denied; you need (at least one of) the SUPER privilege(s) for this operation

Snip of the binlog.sql line 9(BINLOG ') is where the error occurred:

BINLOG '   rLADADADAAAdAAAAHgAAAABAAQANS42LjIyLTcyLjZAZZAZAbG9nAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAACsu7lADADANAAgAEgAEBAQEEgAAXAAEGggAAAAIDADAAAAACgoKGRkAATlU
4cQ=
'/*!*/;

How can we work around this, so we have minimal business impact during the migration? Replication is also not an option because GTID is used on the master(ec2) side and amazon does not support this.

Thanks in advance for your assistance!

JakeJ
  • 13
  • 1
  • 8
  • Sounds like `mysqluser` does not have enough privilages to run that command, or maybe like 8 chnage the password of `mysqluser` – RiggsFolly Feb 09 '16 at 16:54
  • 1
    Users don't work that way in RDS, the super user is not available to any AWS RDS users. – JakeJ Feb 09 '16 at 17:11
  • I suspect the error is not a problem with what the `BINLOG` statement is trying to do, but rather that playback of `mysqlbinlog` output is simply not possible without `SUPER` -- an understandable but extremely limiting aspect of RDS. I suspect replication is going to be the only path, with something (I'll call it a proxy, for lack of a better term) in the middle that can restructure the binlog *stream in flight* from the master, without the GTIDs. – Michael - sqlbot Feb 10 '16 at 03:52
  • It's *possible* that a MariaDB 10.1 server placed between PXC and RDS might fulfill that role, since MariaDB's GTIDs are not compatible with MySQL, and a MariaDB server does know (as of 10.1.8, I think, and possibly later 10.0 releases) how to ignore the incoming GTIDs when connecting to a MySQL master. Have you looked into that? – Michael - sqlbot Feb 10 '16 at 03:53

0 Answers0