I had this error and found the reason for the error in my case. I'm still answering to this old post because it ranks pretty high on Google.
The variables of both of the column I wanted to link were integers but one of the ints had 'unsigned' checked on. Simply un-checking that fixed my error.