Managed database (MySQL) - Error while importing database

September 6, 2019 162 views
MySQL Databases

I’m getting a user privilege error for doadmin while importing a database via command line client on to the newly created database cluster. Importing databases

**Error**: *ERROR 1227 (42000) at line 18: Access denied; you need (at least one of) the SUPER, SYSTEM_VARIABLES_ADMIN or SESSION_VARIABLES_ADMIN privilege(s) for this operation*

How do I grant doadmin Super_priv?

Thanks,
GA

1 Answer

Hello,

Could you share with us what exactly do you have on line 18 in your sql file that you are trying to import? It most likely can be adjusted so that the import could work without the need of super privileges.

Regarding your second question, you can not grant super privileges on the doadmin user as this is a managed service.

Regards,
Bobby

  • Hi,

    The file is mysqldumb file of an existing db on AWS RDS. Here is line 18 of that …

    SET @@SESSION.SQL_LOG_BIN= 0;
    

    which would require atleast system variables privileges

    • I would suggest to try and delete this line from the sql dump, it is not part of your data and would not affect the information that you have in the file. It’s main use is as a SESSION variable to prevent statements from the current session being written to the binary log. Once you remove this line the import should go through as normal.

      You would not have the rights to change the value for the managed databases because if this variable is set to OFF it temporarily disables binary logging, so no changes that are made to the master would be replicated to the slave. This would essentially break any read replicas that you have.

Have another answer? Share your knowledge.