Install MySQL stored procedure to database on plugin install in Craft 3 I am trying to add a MySQL stored procedure to the database on plugin install in Craft 3.  I currently have an install migration calling a function from the safeUp method. In this function I am using Craft::$app-&gt;getDb()-&gt;createCommand(" DELIMITER $$ CREATE PROCEDURE ...")-&gt;execute(). However this does not seem to do the trick.
After further investigation Yii handles the DELIMITER ;; in the createCommand() method. I just had to remove the opening and closing DELIMITER syntax and execute the Craft::$app-&gt;getDb()-&gt;createCommand("CREATE PROCEDURE ( ... )")-&gt;execute() for it to install.