Try using the same name for database and user, like in frappe.
Steps followed: (under the guidance of @revant_one)
- Log on to EC2.
$ ssh -i key_file.pem user@instance_name
- Log on to RDS via EC2.
$ mysql -h abc.rds.amazonaws.com -u username -P 3306 -p
- Create a new database.
mysql [(none)]> create database frappedb;
- Add a user. (Username must be identical to database name)
mysql [(none)]> create user frappedb;
- Set privileges for user.
mysql [(none)]> GRANT ALL ON frappedb.* TO 'frappedb'@'%';
mysql [(none)]> FLUSH PRIVILEGES;
- Exit mysql prompt and restore RDS database to frappedb.
mysql -h abc.rds.amazonaws.com -u username -P 3306 -p frappedb < frappe_backup.sql
- Update mariadb host.
$ bench set-mariadb-host abc.rds.amazonaws.com
- Bench update to confirm setup. Should run smoothly.
$ bench update