• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

I Like Kill Nerds

The blog of Australian Front End / Aurelia Javascript Developer & brewing aficionado Dwayne Charrington // Aurelia.io Core Team member.

  • Home
  • Aurelia 2
  • Aurelia 1
  • About
  • Aurelia 2 Consulting/Freelance Work

How to Fix Access Denied MySQL Error on AWS RDS

AWS · November 11, 2021

If you’re getting the error `Access denied; you need (at least one of) the SUPER, SYSTEM_VARIABLES_ADMIN or SESSION_VARIABLES_ADMIN privilege(s) for this operation` while trying to import a database dump you have done using mysqldump, you might have encountered this issue.

In my situation, I am using Amazon Lightsail and migrating a database to a newer database instance. I ran a mysqldump and then attempted to import the dump into the new database.

You can fix the error by modifying the database dump file (.sql) which is being caused by SESSION.SQL_LOG_BIN and GLOBAL.GTID_PURGED lines. Or, you can use the force flag -f after the MySQL command.

 mysql -f -u dbname -p -h hostvalue -D databasename < dbdump.sql

You will still get errors when you run the import, but it won’t prevent it from happening. Without -f, any errors will cause the MySQL command to fail. This flag tells it to ignore the errors and keep going.

Dwayne

Leave a ReplyCancel reply

0 Comments
Inline Feedbacks
View all comments

Primary Sidebar

Popular

  • Handling Errors with the Fetch API
  • How To Get The Hash of A File In Node.js
  • Testing Event Listeners In Jest (Without Using A Library)
  • The Quad Cortex Desktop Editor is Finally Announced
  • How To Paginate An Array In Javascript

Copyright © 2023 · Dwayne Charrington · Log in

wpDiscuz