Page 1 of 1

Connecting to database

Posted: Tue May 03, 2016 7:33 pm
by montymay
For my application I have decided of late that I should use a remote database rather than creating thousands of cards.(I am studying MySQL in an online course.) I have an Indy license so I have access to the on-rev.com hosting service though the cPanel, which includes a simple procedure for creating a MySQL database. I created one but I have not found a clear explanation on how to connect to it. The tutorial http://lessons.livecode.com/m/4071/l/70 ... l-database was the closest to it, but it is not clear about the content of the database address. Just entering myURL/mydatabasename does not work. I read something about to need to include one's IP address, but if that's true, I don't know how. I know I have a lot to learn, but for now all I want to know is how to connect and disconnect to the database I created in the cPanel. Thank you for any tips or pointers.

Monty

Re: Connecting to database

Posted: Tue May 03, 2016 8:19 pm
by Da_Elf
they online database has to accept your ip address meaning that you have to have a static ip address from your ISP

Re: Connecting to database

Posted: Tue May 03, 2016 11:22 pm
by montymay
On the cPanel there is a button named "My Remote SQL" that opens the following panel. Although to this novice its use is not clear, is it possible that one can enter one's dynamic (non-static) IP address and then access the database? AFAIK, getting a static IP address from one's ISP will be costly.
Capture.JPG
Capture.JPG (30.78 KiB) Viewed 5620 times
It so, then how is the database address formulated? If this is not its use, what is it for?

If the "My Remove SQL" feature isn't for users without static IP addresses, is there some workaround that does not require buying a static IP address?

Re: Connecting to database

Posted: Wed May 04, 2016 2:17 am
by Da_Elf
thats why i usually have my database local. i just setup mysql on my computer

Re: Connecting to database

Posted: Thu May 05, 2016 1:59 am
by Simon
Hi Montymay,
Check out this link and the blog it leads to;
http://forums.livecode.com/viewtopic.ph ... 15#p124003
This is the secure way of accessing your DB.

Simon

Re: Connecting to database

Posted: Fri May 06, 2016 7:20 am
by montymay
Thanks, Simon, for the link. I had come across it in searching the forum but did not realize its relevance to my problem. Correct me if I am misstate the gist of the solution: those with dynamic IP addresses must write and install on the server a php file that acts as a go-between (hence: middleware) between the remote MySQL database and the LC application on the local machine. I see mentions of a simpler alternative solution: installation of Livecode Server on the server, so it would seem that the latter technique should be studied before going "all in" on the first. So for now I think I will begin the study of php and MySQL, with side glances at Livecode Server, and see how it goes.

Monty

Re: Connecting to database

Posted: Fri May 06, 2016 7:42 am
by Simon
Hi Monty,
It's that "My Remote SQL" worries me a whole bunch.
I'm not an internet security guy but putting a wildcard in that seems crazy.

Simon