We have AWS Amazon Linux EC2 instances that connect to separate AWS RDS instances running MySQL.

We want to run the `mysql` command on the RDS instances to process a number of large SQL files that contain thousands of SQL statements. However, we need to be able to run these commands from a PHP application installed on the EC2 instances.

Is this possible and how can it be done?  

For testing, we installed MySQL on the same machine as the PHP application, and were able to successfully run the `mysql` command to query both the localhost MySQL instance as well as the remote MySQL instances on the AWS RDS instances.

However, we're not sure how to do this when MySQL isn't installed and the `mysql` command isn't available on the EC2 instances.

We have explored using the `ssh` command in combination with the `mysql` command, but nothing seems to work yet.  

Any advice is greatly appreciated. Thank you.