Updated preview_test cookbook to support mysql or cassandra. Fixed some mysql bugs.