Change to
task createDB {
description= "Creates the Database. Needs database name to be passed (like: -PdbName=someDBname)"
doLast {
sql = Sql.newInstance( 'jdbc:mysql:thin://localhost:3306/', mysqlUser, mysqlPassword, 'org.drizzle.jdbc.DrizzleDriver' )
sql.execute( 'create database '+"`$dbName`" )
}
}