Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We are moving a production site to EC2/RDS

Followed these instructions:

I have set up row-based binary logging on the production server did a:

mysqldump --single-transaction --master-data=2 -C -q -u root -p > backup.sql

then imported to RDS instance. No dramas.

Due to the size of the db, and minimal downtime requirements, I've got to update the ec2 db to the latest datas via the binlogs, and it won't let me.

mysqlbinlog mysql-bin.000004 --start-position=360812488 | mysql -uroot -p -h

and it says:

ERROR 1227 (42000) at line 6: Access denied; you need (at least one of) the SUPER privilege(s) for this operation

My guess, based on what is on line 6 of the binlog, is that it's the 'write to the BINLOG' statements in the SQL backup, and because RDS doesn't support this, it can't run these statements, or something, I don't really know.

Please help.

share|improve this question
up vote 2 down vote accepted

Most likely this is happening because mysqlbinlog writes BINLOG command as the first command to the output, and execution of that command requires SUPER privileges that you don't have on RDS.

To drop that command use --base64-output=NEVER option (note, it'll require also --read-from-remote-server --host=localhost --user username --password).

However after you overcome this problem, there's likely to another one, this time with @@session commands that mysqlbinlog writes to the output. They also require SUPER privileges.

I haven't found a better way that to use sed -i '/SET @@session/d' binlog_dump.sql to remove them and then execute import into MySQL.

share|improve this answer
Thanks I ended up doing it the most slow, stupid but reliable way possible: just taking the site down, taking a backup and moving the data in one big chunk. Thanks though, I have been wondering how people get around this for nearly a year now. – timoxley Jun 7 '12 at 10:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.