Page 1 of 1

MySQL & SSL

Posted: Tue Aug 23, 2016 4:40 pm
by Konflict3
Hi,

I'm receiving "SSL connection error" with LC 8.0.2 IDE on OS X

Same error happens in IDE's of: 8.0.1, 7.1.3, 7.1.1

Identical script however works in 7.0.6

I can also connect to the server with same user / pass and host of course using Workbench.

Code used to open connection:

Code: Select all

revOpenDatabase("mysql",x.x.x.x:xxxx,dbname,dbuser,dbpass,true)
Everyone else ok with ssl?

Thanks

K

Re: MySQL & SSL

Posted: Tue Aug 23, 2016 5:24 pm
by ghettocottage
If you have not aleady, you might try adding this line just before your revopendb line :

Code: Select all

   libUrlSetSSLVerification false

Re: MySQL & SSL

Posted: Tue Aug 23, 2016 9:05 pm
by Konflict3
ghettocottage wrote:If you have not aleady, you might try adding this line just before your revopendb line :

Code: Select all

   libUrlSetSSLVerification false
Hi ghettocottage,

unfortunately this does not have any effect - still getting "SSL connection error".

Thank you for the tip though!

K

Re: MySQL & SSL

Posted: Sat Nov 26, 2016 2:04 pm
by sphere
Hi,

i have SSL too on my website.
And connecting to the DB does not give any troubles.

Try and see in your DB management that your IP has permission to access it.
In many cases you have to provide explicit access for your IP else you can't reach it.

Else anyone could reach it.

Testing on a localhost will always work (when you have something like Easyphp running local on your machine)

If you want your program to be used by others too, and it needs access to the DB too,
then you better use something in between your program and the DB. Examples are here:
http://forums.livecode.com/viewtopic.php?f=12&t=27521

Re: MySQL & SSL

Posted: Sat Nov 26, 2016 2:27 pm
by FourthWorld
Is the problem still evident in a more recent version of LiveCode?

Looking through related bug reports, I found a note in one with the same recipe as yours where the reporter noted that following the steps in this Lesson solved the issue - hopefully it may help your situation as well:
http://lessons.livecode.com/m/4071/l/70 ... l-database

Is your database directly exposed to the Internet? The more common approach is to write an HTTP API using PHP, Python, LC Server, or other software so you have the opportunity to protect the database by validating and sanitizing inputs.

Re: MySQL & SSL

Posted: Tue Dec 06, 2016 10:19 am
by MaxV
Fourthworld suggestion regards this: http://www.slideshare.net/billkarwin/sq ... -fallacies

Re: MySQL & SSL

Posted: Tue Dec 06, 2016 4:32 pm
by FourthWorld
MaxV wrote:Fourthworld suggestion regards this: http://www.slideshare.net/billkarwin/sq ... -fallacies
Good find, Max. Slides 35-39 were especially useful to me.