Create a New Grant User on AWS RDS (MariaDB)

Today, I’ve played with AWS RDS with MariaDB. In the normally, AWS is created just one user for access AWS RDS. Here is the steps for create a new grant user on AWS RDS with MariaDB.

mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, PROCESS, REFERENCES, INDEX, ALTER, SHOW DATABASES, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER ON *.* TO 'YOUR-MYSQL-USERNAME'@'CLIENT-IP-OR-DNS-NAME' IDENTIFIED BY 'CLEAR-TEST-PASSWORD' WITH GRANT OPTION;

Query OK, 0 rows affected (0.009 sec)

This command means you successfully created your RDS user for MariaDB with all grant options and you set a password. Great. But you need to completely save this privilege. For this please run the code below.

mysql> FLUSH PRIVILEGES;

Query OK, 0 rows affected (0.009 sec)

And that’s it!

P.S. If your RDS instance is public and need to access via internet, please do not forget your Security Group of your RDS Instance.