if using ubuntu, type mysql -u root -p and enter password you set for your mysql DB. you will be greeted by mariaDB as shown in the picture. if not then you are having different sql setup.. go to shinobi documentation page and study the "installation the hard way". there it would have mentioned how to install mariaDb. but first search google to completely uninstall your existing mysql. its very important, if your current mysql is not uninstalled properly, MariaDb will throw error while installing.!!(https://www.tecmint.com/install-mariadb-in-ubuntu-and-debian/)
This is easy. Go to the monitor settings and scroll down to "Stream" category. There is an option "Rotate" which you can set to 180 degrees. This will add "-vf transpose=2,transpose=2" to the ffmpeg cmd.
Also many cameras have this option built into their web interface.