Alright, so MySQL seems to bork with special characters in passwords when mysql receices data through a pipe. Dont ask why, who knows. For the moment, try to avoid passwords with characters that requires shell quoting or escaping