This happened with a select statement which writes the result to an external file. I didn't remember the privilege "FILE" must be granted on *.* for this to work successfully, it wasn't actually an authentication issue as it implies since I was already in the SQL prompt and doing the query.
SELECT some_id
FROM sometable
INTO OUTFILE '/tmp/result.txt'
Keep in mind that the above won't work even with permissions set to 777, your user must have privileges from MySQL to write to the filesystem.
mysql, user, select, writes, external, didn, quot, successfully, wasn, authentication, implies, sql, prompt, query, some_id, sometable, outfile, tmp, txt, permissions, privileges, filesystem,