Is it possible to work with a MySQL database directly from Salesforce? If not, is the main approach to create some sort of web service to sit in the middle between the two?


Not possible directly, salesforce does not allow TCP connections which would be required to directly connect to mysql. It only allows HTTP(S) callouts, so an intermediate webservice of some sort if required to proxy the HTTP(S) traffic to the mysql protocol.

  • This is what I thought but I'm glad you could help to confirm it, thanks. – Ryan Elkins Aug 9 '12 at 23:31
  • @ca_peterson, any changes on this? I know we can do it in Java, for instance, and make call from apex to my Java program. But directly from apex? – Agustina García Feb 16 '17 at 15:11
  • No way to call anything other than HTTP from apex. You can't implement a binary protocol like mysql needs. – ca_peterson Feb 16 '17 at 17:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.