Use utf8 when connecting to MySQL
Use argparse to parse args.

Use -h|--help to show help.

usage: parselog.py [-h] [-t TABLE] [-s SERVER] [-u USER] [-p PASSWORD]
                   [-P PORT] [-d DATABASE]
                   logfile

positional arguments:
logfile               the log file

optional arguments:
-h, --help            show this help message and exit
-t TABLE, --table TABLE
                        Set the MySQL table to create and store the
entries in
                        (default: entries)
-s SERVER, --server SERVER
                        Set MySQL host (default: localhost)
-u USER, --user USER  Set MySQL user (default: root)
-p PASSWORD, --pass PASSWORD
                        Set MySQL password (default: none)
-P PORT, --port PORT  Set MySQL port (default: 3306)
-d DATABASE, --database DATABASE
                        Set MySQL database (default: parselog)