Remote database access: How?
tereza at califex.com
Mon Jun 8 14:06:49 CDT 2009
On Jun 8, 2009, at 11:19 AM, viktoras d. wrote:
> a while ago I have produced exactly such application to one of my
> clients. Client downloads it, the app communicated with mysql
> database on a remote server. I used a relay script written in Perl
> (so it should work everywhere, because Perl is omnipresent
> nowadays). It will pass nearly all sql except for alter, truncate,
> drop, modify, create. User must post two parameters - pasword and
> sql query to communicate with the database. Unfortunately both are
> submitted as clear text
On Jun 8, 2009, at 9:38 AM, Trevor DeVore wrote:
> If you have a Rev CGI and standalone that support arrayDecode/
> arrayEncode then your life is easier. You can just make calls to the
> Rev CGI that asks for a type of result, the Rev CGI makes the query,
> converts the cursor to an array, encodes the array and then returns
> it. In the standalone you can just decode the array and you are good
> to go.
Both of these suggestions will come in handy, but guess what? I got
Trevor's Recipes demo to directly access the DB on the remote server!
The guy who babysits the server helped by pointing out that the MySQL
on that server was listening only to localhost, so we set it to listen
to any IP address. Then we had to make sure that the password sent by
Runtime Revolution was compatible with the password created by MySQL
(as per Ken Rays' tip <http://www.sonsothunder.com/devres/revolution/tips/data004.htm
>). The easiest (temporary) thing to do was use a blank password.
Then presto! The data appeared.
Now the task is to create the db for the project, and make it do what
I need it to do — by tomorrow.
Why is Revdb still compatible only with MySQL versions less than 4.x?
I can use it now for this pilot project, but I'll have to pursue a
different solution for the full-fledged app.
Thanks to all who replied,
Califex Software, Inc.
More information about the use-livecode