mysql rds root权限,MySQL / Amazon RDS错误:“您没有超级权限...”

2023-05-16

I'm attempting to copy my mysql database from an Amazon EC2 to an RDS:

I successfuly did a mysqldump of my database into my root folder using this:

root@ip-xx-xx-xx-xx:~# mysqldump my_database -u my_username -p > my_database.sql

Then I tried to transfer this .sql file to my new RDS database:

root@ip-xx-xx-xx-xx:~# mysql my_database -u my_username -p -h

my_new_database.xxxxxxxxx.us-east-1.rds.amazonaws.com < my_database.sql

Unfortunately, I get following error message:

You do not have the SUPER privilege and binary logging is enabled

(you *might* want to use the less safe log_bin_trust_function_creators variable)

I tried to GRANT SUPER.. in a variety of ways but I'm getting errors when I try to do that too. Typing mysql > FLUSH privileges; doesn't work either.

I'm a mysql beginner so sorry for such an easy question. Thoughts?

解决方案

Per http://getasysadmin.com/2011/06/amazon-rds-super-privileges/, you need to set log_bin_trust_function_creators to 1 in AWS console, to load your dump file without errors.

If you want to ignore these errors, and load the rest of the dump file, you can use the -f option:

mysql -f my_database -u my_username -p -h

my_new_database.xxxxxxxxx.us-east-1.rds.amazonaws.com < my_database.sql

The -f will report errors, but will continue processing the remainder of the dump file.

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

mysql rds root权限,MySQL / Amazon RDS错误:“您没有超级权限...” 的相关文章

随机推荐