How do I get access to the mysql logs from a RDS instance

priya picture priya · Jan 4, 2012 · Viewed 22.1k times · Source

How do I get access to the MySQL logs (primarily to take a look at the insert/update/delete statements) from an Amazon RDS instance?

Answer

user1045217 picture user1045217 · Jan 4, 2012

Basically you have to enable the "general_log" parameter in the parameter group of your RDS instance

$ rds-modify-db-parameter-group mydbparametergroup --parameters "name=general_log,value=ON,method=immediate" 

In case you did not apply the parametergroup to the instance:

$ rds-modify-db-instance mydbinstance  --db-parameter-group-name mydbparametergroup

Then access your mysql instance using root:

mysql> select * from mysql.general_log;

See:

AWS Developer Forum - Re: general query log

AWS RDS - Working with DB Parameter Groups