I am trying to get my Symfony 3 app running in production mode on an Amazon EC2 instance.
I am have the code in the correct place, and then I try to setup any dependenci
As discussed in comments you did not have any privilege on the database. So running this fixes your problem:
GRANT ALL PRIVILEGES ON my_database.* TO 'my-user'@'localhost'
About your doubt why you had to change it to localhost in your params because that's what you're telling mysql Imagine you want to restrict database access to only a specific ip in your network you could run
GRANT ALL PRIVILEGES ON my_database.* TO 'my-user'@'192.168.1.10'
So replace 192.168.1.10 with 127.0.0.1 and you can use 127.0.0.1 in your parameters