Flex socket connection to MySql

152 views
Skip to first unread message

Guru

unread,
Jan 29, 2008, 2:25:32 AM1/29/08
to Flex India Community
Is it possible to make a direct socket connection from Flex ? eg,
connect to MySql on port 3306 which is exposed in the same domain ?
and execute SQL scripts ?

Abdul Qabiz

unread,
Jan 29, 2008, 4:02:54 AM1/29/08
to flex_...@googlegroups.com
Yup! You can get the mysql driver written in actionscript 3 and put the right crossdomain.xml (with toPort=3306 attribute).

http://maclema.com/assql/




---------------------------------------

Vinod M Jacob

unread,
Jan 29, 2008, 4:08:12 AM1/29/08
to Flex India Community
Hi-

Yes it is possible.
You can write MSSQL driver in actionscript and connect to MySQL server
directly from flex .

Use flash.net.Socket class

But doing this is not a good approach as all of your mysql
authentication info is included in the swf file. The swf
can be easily decompiled .

It is better to go with a middleware such as ASP/JSP

Gireesh Kumar

unread,
Jan 29, 2008, 4:18:51 AM1/29/08
to flex_...@googlegroups.com
humm, So how can i sign or encrypt my swf file to that it cannot be decompiled ?



Thanks
Gireesh
--
Gireesh Kumar G
http://gireeshkumar.ind.in/

Gireesh Kumar

unread,
Jan 29, 2008, 4:20:23 AM1/29/08
to flex_...@googlegroups.com

Thanks Abdul,

  I will try this,

Thanks
Gireesh

Vinod M Jacob

unread,
Jan 29, 2008, 5:20:57 AM1/29/08
to Flex India Community
Hi-

I think we need some third part software to encrypt swf.


On Jan 29, 2:18 pm, "Gireesh Kumar" <gireeshkuma...@gmail.com> wrote:
> humm, So how can i sign or encrypt my swf file to that it cannot be
> decompiled ?
>
> Thanks
> Gireesh
>
> On Jan 29, 2008 2:38 PM, Vinod M Jacob <flex4...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Hi-
>
> > Yes it is possible.
> > You can write MSSQL driver in actionscript and connect to MySQL server
> > directly from flex .
>
> > Use flash.net.Socket class
>
> > But doing this is not a good approach as all of your mysql
> > authentication info is included in the swf file. The swf
> > can be easily decompiled .
>
> > It is better to go with a middleware such as ASP/JSP
>
> > On Jan 29, 12:25 pm, Guru <gireeshkuma...@gmail.com> wrote:
> > > Is it possible to make a direct socket connection from Flex ? eg,
> > > connect to MySql on port 3306 which is exposed in the same domain ?
> > > and execute SQL scripts ?
>
> --
> Gireesh Kumar Ghttp://gireeshkumar.ind.in/- Hide quoted text -
>
> - Show quoted text -

Abdul Qabiz

unread,
Jan 29, 2008, 12:50:00 PM1/29/08
to flex_...@googlegroups.com
Why don't you want to use any middle-ware (php etc)?

It's not good idea to hardcode authentication details in swf, you can use URLStream to load bytes (probably a swf with encrypted/hashed details).

-abdul
--
-abdul
---------------------------------------
http://abdulqabiz.com/blog/
---------------------------------------
Reply all
Reply to author
Forward
0 new messages