# How to import MySQL backup into Amazon Aurora MySQL

Amazon Aurora is a relational database management system (RDBMS) built for the cloud with full MySQL and PostgreSQL compatibility. The managed approach allows AWS to offer high scalability, serverless options, and a 99.99% SLA.

However, the managed approach also means users do not have full access to manage the DB and perform certain actions usually allowed under self-hosted options. One of these limitations is highlighted during the data import stage.

A standard **.sql** file contains certain SET commands that even the super admin does not have permission to execute on the Amazon Aurora MySQL.

Attempts to import any **.sql** file raise the below error:

`Access denied; you need (at least one of) the SUPER or SYSTEM_VARIABLES_ADMIN privilege(s) for this operation`

Luckily, this error can be fixed easily. We must remove certain SET commands that allow us to import the data to Amazon Aurora MySQL successfully.

Open the .sql file in your preferred editor. At the start of the file, we need to remove the three SET commands below.

```sql
SET @MYSQLDUMP_TEMP_LOG_BIN = @@SESSION.SQL_LOG_BIN;
SET @@SESSION.SQL_LOG_BIN= 0;
SET @@GLOBAL.GTID_PURGED=/*!80000 '+'*/ '';
```

Below, I've highlighted the section of the file that you can remove.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1711062643285/c27d29ce-2c45-4b81-9571-ba4099fffc52.png align="center")

Next, scroll to the end of the file, and remove the below line

```sql
SET @@SESSION.SQL_LOG_BIN = @MYSQLDUMP_TEMP_LOG_BIN;
```

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1711997473251/781a9f80-0168-492e-908b-cabbde9ad995.png align="center")

Save the file and attempt to import the data again. This time the import should be successful :)
