Skip to content

New RDS behavior? Can't interact with the mysql.user schema anymore for insert and update

0

So we use the mysqldump and mysql commands to backup and reinsert all that user data since it is a quite common way, but it seems this week RDS started to deny our admin user to interact with the schemas besides SELECT anyone else facing this issue?

We also used this for quite a few years and today we noticed it stopped working.

asked a year ago259 views

1 Answer
0
Accepted Answer

Yes, there has been a recent change in RDS for MySQL that affects how you can interact with the mysql database, including the mysql.user schema. Starting with RDS for MySQL version 8.0.36, direct modifications to tables in the mysql database are no longer allowed. This includes creating database users by performing data manipulation language (DML) operations on the grant tables.

Instead of directly inserting or updating the mysql.user schema, you now need to use MySQL account-management statements such as CREATE USER, GRANT, and REVOKE to manage user privileges. This change is part of a move towards a role-based privilege model for RDS MySQL.

For your backup and restore processes using mysqldump, you may need to adjust your approach. When exporting metadata for database users during migration from an external MySQL database, you can utilize MySQL Shell's instance dump utility or the mysqlpump client utility.

If your application has been using shortcuts to create users or other objects by inserting into the mysql tables, you'll need to modify your application code to use the corresponding statements like CREATE USER.

This change is intended to improve security and align with best practices for database management in RDS. While it may require some adjustments to your existing processes, it's designed to provide a more secure and standardized approach to user and privilege management in RDS for MySQL.
Sources
Role-based privilege model for RDS for MySQL - Amazon Relational Database Service

answered a year ago

EXPERT

reviewed a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.