You just woke up a four years old question which is completely obsolete now as Unity doesn't have this restriction anymore since at least Unity 5.6 i think.
You most likely don't have the exact same problem as the OP. So if you have a similar question, ask a seperate question and do not try to hijack other peoples questions.
You posted an answer without answering the question.
Bumping threads without adding anything new is a bad habit.
There is already an answer that presented a solution (to use WWW and a PHP interface on your server). However as the Socket restriction doesn't apply anymore you should be able to juse use the normal $$anonymous$$ySQL connector. Though it's never recommended to directly connect to a $$anonymous$$ySQL server. In almost all cases you want to communicate through a PHP or similar interface.