Mysql – Creating MySQL Events in Amazon RDS

amazon-rdsMySQL

I'm trying to create a MySQL Event on an RDS database. It took me a bit to figure out that I needed to change the DB Parameters and get the scheduler started. However, even with the scheduler running (I see is running in SHOW PROCESSLIST), I am still getting "ERROR 1044 (42000): Access denied for user…" when I create an event. I tried posting on the AWS discussion boards, but nothing.

Has anyone created a MySQL event in an AWS RDS instance? If so, what I am not doing, or what am I missing to get it created?

I'm using the Master User account so I suspect it has to be another DB Parm I havent set (I suspect).

Best Answer

You have to create a parameter group for your instance.

Go to your RDS Dashboard and click parameters on the left.

You should see a list of parameter groups, if you only see "default" groups, then you need to create a new group. (see 1a). If you already have a custom parameter group, skip to 1b.

1a. Click create parameter at the top, make sure you select the appropriate MySql version you're DB is using (found on the instances dashboard). Give it a name and click "yes, create". (also do 1c).

1b. Click the magnifying glass in the row where your parameter group is and it will take you to the details page.

On the details page look at the bottom and you will see "Filter:" in the search box type "Event". Let the table filter and then click "Edit Parameters". In the list below you want to change the "values" column for "event_scheduler" and type "ON" in the box.

If you originally started with a parameter group you're good to go, you can head over to your instances dashboard to see that it's applying your parameter group changes. If you created your parameter group, continue on.

Warning! The next step requires a reboot!

1c. You need to apply your parameter group to your DB instance. Click instances on the left and then select the DB you want to apply the parameter group to. At the top you want to click "Instance Actions" and then "Modify".

Change the "Parameter Group" selection to be the new parameter group you created. Click continue at the bottom of the page, then modify db instance on the next page. You now need to reboot your server, select "Instance Actions" then "Reboot".