Forum Discussion

samy's avatar
samy
New Contributor
6 years ago

Unable to connect to SnapLogic MySQL to AWS MySQL instance but able to connect to that instance in AWS environment

Hi Team,

When tried to connect to mySQL select in Snaplogic with instance in AWS account getting below mentioned error.

Failed to validate account: Failed to retrieve a database connection. Cause: Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. (Reason: Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.; Resolution: Address the reported issue.)

Screenshot attached here for the reference. Any immediate help here will be appreciable.

2 Replies

  • tstack's avatar
    tstack
    Former Employee

    The next release of the platform will have an expression language function for converting characters to their HTML entities. Until then, I think most people use replace() to do the substitution on the string, like so:

    $msg.replaceAll('&', '&amp;').replaceAll('<', '&lt;').replaceAll('>', '&gt;')
    

    Or, the slightly fancier:

    $msg.replace(/&|<|>/g, m => match m { '&' => '&amp;', '<' => '&lt;', '>' => '&gt;' })
    
  • Have you tried using the encodeURIComponent() function? E.g. encodeURIComponent(“sam & max”)