Credit Anthony Ferrara for help and advice with addressing SET NAMES issues on MySQL, refs #1265, #1266, #1267