Credit Anthony Ferrara for help and advice with addressing SET NAMES issues on MySQL, refs #1362, #1363, #1364