Is it possible for a program to make some of the connections through proxychains and some directly? In other words, is it possible to make proxychains pass through connections to, eg. localhost?

I have a script which downloads files from FTP server (this should be proxified) but in the same time makes connection to local MySQL, which breaks when proxified. What can I do?