Can't connect to MySQL

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
croivo
Posts: 111
Joined: Wed Feb 26, 2014 11:02 pm

Can't connect to MySQL

Post by croivo » Sun Oct 04, 2015 5:38 pm

I followed the tutorial on this link (http://lessons.runrev.com/m/4071/l/7003 ... l-database) but always get this error:
error.png
error.png (5.43 KiB) Viewed 5542 times
My server uses Cpanel version 11.52.0 (build 9) and MySQL version 5.5.45-cll-lve

tomyeto
Posts: 3
Joined: Fri Oct 02, 2015 5:22 pm

Re: Can't connect to MySQL

Post by tomyeto » Sun Oct 04, 2015 6:51 pm

If your database is hosted on webhosting, please make sure you allow remote access using your IP address.

croivo
Posts: 111
Joined: Wed Feb 26, 2014 11:02 pm

Re: Can't connect to MySQL

Post by croivo » Sun Oct 04, 2015 8:16 pm

Yes, I added "%" host to access the database... Still not working.

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

Re: Can't connect to MySQL

Post by ghettocottage » Mon Oct 05, 2015 4:58 am

Try adding your IP address

SparkOut
Posts: 2947
Joined: Sun Sep 23, 2007 4:58 pm

Re: Can't connect to MySQL

Post by SparkOut » Mon Oct 05, 2015 7:02 am

It may well be that whatever you set up in cPanel the ISP will block traffic direct to those ports. See what your ISP support/FAQ have to say.

croivo
Posts: 111
Joined: Wed Feb 26, 2014 11:02 pm

Re: Can't connect to MySQL

Post by croivo » Mon Oct 05, 2015 10:23 am

I contacted my hosting support... and they told me to use "SSH Tunnel". Any example of how to use that tunnel in Livecode?

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

Re: Can't connect to MySQL

Post by ghettocottage » Mon Oct 05, 2015 1:47 pm

what OS are you using? An SSH tunnel from a mac or linux is fairly simple,and I have even wrote a little script that can be launched from LC that creates a tunnel
.. from Windows you would (I seem to recall) use a little free application called Putty.

It is also possible to use a different method of connecting to your database where you send requests to a middle-man like LiveCode Server or PHP.

Someone wrote a blog-post about doing that:
http://learninglivecode.blogspot.com/20 ... eware.html

croivo
Posts: 111
Joined: Wed Feb 26, 2014 11:02 pm

Re: Can't connect to MySQL

Post by croivo » Mon Oct 05, 2015 6:37 pm

I'm on Windows...

That 'middle-man' idea sounds great... I'm gonna try that.

Tnx to all :)

Post Reply