MySQL & SSL

Creating desktop or client-server database solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Konflict3
Posts: 4
Joined: Sun Jun 09, 2013 10:57 pm

MySQL & SSL

Post by Konflict3 » Tue Aug 23, 2016 4:40 pm

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

ghettocottage
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 366
Joined: Tue Apr 10, 2012 9:18 am

Re: MySQL & SSL

Post by ghettocottage » Tue Aug 23, 2016 5:24 pm

If you have not aleady, you might try adding this line just before your revopendb line :

Code: Select all

   libUrlSetSSLVerification false

Konflict3
Posts: 4
Joined: Sun Jun 09, 2013 10:57 pm

Re: MySQL & SSL

Post by Konflict3 » Tue Aug 23, 2016 9:05 pm

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

sphere
Posts: 1145
Joined: Sat Sep 27, 2014 10:32 am
Location: Earth, Except when i Jump

Re: MySQL & SSL

Post by sphere » Sat Nov 26, 2016 2:04 pm

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

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9801
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: MySQL & SSL

Post by FourthWorld » Sat Nov 26, 2016 2:27 pm

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.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

MaxV
Posts: 1579
Joined: Tue May 28, 2013 2:20 pm
Location: Italy
Contact:

Re: MySQL & SSL

Post by MaxV » Tue Dec 06, 2016 10:19 am

Fourthworld suggestion regards this: http://www.slideshare.net/billkarwin/sq ... -fallacies
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9801
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: MySQL & SSL

Post by FourthWorld » Tue Dec 06, 2016 4:32 pm

MaxV wrote:Fourthworld suggestion regards this: http://www.slideshare.net/billkarwin/sq ... -fallacies
Good find, Max. Slides 35-39 were especially useful to me.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Post Reply

Return to “Databases”