The error says it: "No database selected" - you need to select a database before running that script. The script itself does not contain a CREATE DATABASE ... or USE ... query, so you need to activate one in HeidiSQL and then run the script.
Please login to leave a reply, or register at first.