Page 1 of 1

Can't connect to MySQL

Posted: Sun Oct 04, 2015 5:38 pm
by croivo
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 5533 times
My server uses Cpanel version 11.52.0 (build 9) and MySQL version 5.5.45-cll-lve

Re: Can't connect to MySQL

Posted: Sun Oct 04, 2015 6:51 pm
by tomyeto
If your database is hosted on webhosting, please make sure you allow remote access using your IP address.

Re: Can't connect to MySQL

Posted: Sun Oct 04, 2015 8:16 pm
by croivo
Yes, I added "%" host to access the database... Still not working.

Re: Can't connect to MySQL

Posted: Mon Oct 05, 2015 4:58 am
by ghettocottage
Try adding your IP address

Re: Can't connect to MySQL

Posted: Mon Oct 05, 2015 7:02 am
by SparkOut
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.

Re: Can't connect to MySQL

Posted: Mon Oct 05, 2015 10:23 am
by croivo
I contacted my hosting support... and they told me to use "SSH Tunnel". Any example of how to use that tunnel in Livecode?

Re: Can't connect to MySQL

Posted: Mon Oct 05, 2015 1:47 pm
by ghettocottage
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

Re: Can't connect to MySQL

Posted: Mon Oct 05, 2015 6:37 pm
by croivo
I'm on Windows...

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

Tnx to all :)