protected function taskMysqlCreateDatabase($dropDatabase = false)
    {
        $dbName = $this->config(CONFIG::KEY_BUILD . '/' . Config::KEY_DB . '/db-name');

        $sqlDropDb   = "DROP DATABASE `{$dbName}`";
        $sqlCreateDb = "CREATE DATABASE IF NOT EXISTS `{$dbName}`";

        /** @var RoboFile|CollectionBuilder $collection */
        $collection = $this->collectionBuilder();

        // Skip database drop and create incase mysql_bin is not set
        $mysqlBin = $this->config(Config::KEY_ENV . '/' . Config::KEY_MYSQL_BIN);
        if (empty($mysqlBin)) {
            $collection->progressMessage('mySQL database managing skipped');

            return $collection;
        }

        // Drop Database
        if ($dropDatabase === true) {
            $taskDropDatabase = $this->taskMysqlCommand();
            $taskDropDatabase->option('-e', $sqlDropDb);

            $collection->progressMessage('Drop Database (as requested)');
            $collection->addTask($taskDropDatabase);
        }

        // Create DB
        $createDatabase = $this->taskMysqlCommand();
        $createDatabase->option('-e', $sqlCreateDb);

        $collection->progressMessage('Create Database');
        $collection->addTask($createDatabase);

        return $collection;
    }