Ruby on Rails cannot access production RDS on AWS I have done rake db:create sucessfully. But rails db:migrate has access errors on the AWS RDS:
Mysql2::Error: Can't create table `llpdn9i88kz3y837`.`comments` (errno: 150 &quot;Foreign key constraint is incorrectly formed&quot;)

and
SHOW ENGINE INNODB STATUS;  

Error: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
SQLState:  42000
ErrorCode: 1227

and
GRANT PROCESS ON llpdn9i88kz3y837.* TO 'n8p1kzg1v9chfcny'@'localhost';

Error: Access denied for user 'n8p1kzg1v9chfcny'@'%' (using password: YES)
SQLState:  28000
ErrorCode: 1045
The @'localhost' bit is certainly an issue as you’re connecting to a remote RDS instance, not one located in the same instance as your Rails code.
Instead you can do something like this:
GRANT PROCESS ON llpdn9i88kz3y837.* TO 'n8p1kzg1v9chfcny'@'%';

However, depending on what the Rails code may be doing during the setup phase, you may want to consider granting all privileges:
GRANT ALL ON llpdn9i88kz3y837.* TO 'n8p1kzg1v9chfcny'@'%';

After the system is installed and running, then you can reduce the privileges to just what is needed.