What are the dangers of not gracefully shutting down mysql server
It's possible that a transaction may be partially committed leading to unresolvable corruption on reboot. This is especially the case if you use MyISAM tables - InnoDB tables have a double write buffer which is a form of Write Ahead Log (WAL). 

A good discussion of the concepts is available here and here. Note that from the Percona article we have "the changes made by transactions will occur in volatile memory and later be flushed to disk". Switch off the machine and your RAM evaporates.

Note that despite these elaborate precautions and systems, many questions here concern MySQL corruption (even with InnoDB engine tables) which shows that no system is perfect. The "horse's mouth" guide to InnoDB (i.e. Oracle/MySQL's own technical article on the issue) is available here.

This corruption can lead to the need for a restore from backup which means that data changed/inserted between then and the power interruption is lost. It's not a good idea on production servers and is the reason that we have UPSs (Uninterruptable Power Supply) on them.