scalarium/cookbooks — pull request #10 by till (2012-08-24 14:25:38+00:00)
Title: fix mysql database creation during deploy::mysql

## bugfix

When you create a database you need to escape the name with backticks (so all kinds of words are possible). I was not aware that this happened when I created an arbitrary application – but that's another concern, I think. Regardless, now my application could be called `from` and it could create that database.

For reference: http://dev.mysql.com/doc/refman/5.1/en/reserved-words.html

## improvement:

I decided to use `CREATE DATABASE IF NOT EXISTS` instead of the seperate lookup with `SHOW DATABASES` which then uses `egrep` to check.