mariadb – Ruby on Rails cannot access production RDS on AWS. Part 2

I can connect with Squirrel to my DB, which is created with rake db:create.
When I run rake db:migrate I get the error:

Caused by:
Mysql2::Error: Can't create table `gmrdb`.`comments` (errno: 150 "Foreign key constraint is incorrectly formed")

A GRANT ALL ON pfhp.gmrdb TO 'leder'@'%'; runs fine on squirrel, but does not change the error message in rails! Same for SET FOREIGN_KEY_CHECKS=0.

What to do to let rails create the tables? In development environment with sqlite3 it works!

This is my 20210525180118_create_comments.rb

class CreateComments < ActiveRecord::Migration(6.1)
  def change
    create_table :comments do |t|
      t.string :commenter
      t.text :body
      t.references :article, foreign_key: true