that's because the database doesn't exist.
your (not) script <aka swiped homework> does not create a database, only creates the table.
if this is indeed swiped homework...there are copyright issues here.
the hardest line to type correctly is: stty erase ^H