Why do some hosting services with MySQL not allow triggers and stored procedures / functions?
Had never tried to use them and now I've done it and deployed a site, I discover I can't create triggers, and that some hosting provider don't allow users to do them... this is a rant but more of a question, as I didn't know and maybe there's lore to it you do know...

  • 3
    Sprocs and functions: permissions
    Triggers: That potentially allows you to turn their db into a worker, and they can't control the amount of work you put into them. Their pricing model is based on the instructions, events originating in your system.
  • 1
    If it's shared hosting its because your db is just one of hundreds on the same db server and they aren't going to give you elevated privileges that can access other dbs which is what is needed to create triggers and stored functions. Plus if you create super load on your db it affects all others on system.

    If you have a vps you can install your own db server and have all the privileges you want.
Add Comment