[Interest] Database in LINUX application in windows

2 views
Skip to first unread message

Sujan Dasmahapatra

unread,
Feb 15, 2012, 8:34:03 AM2/15/12
to inte...@qt-project.org

Dear Friends

Can we have a database (MySQL) which is in LINUX and my Qt application is running in windows, can we fetch the data from that database ? I can have my application cross-platform in LINUX and work. But if my user likes to work in windows and communicate with some database inLINUX, is it possible. I thinking of using ftp for this. Is this the right solution. ? Thanks  for any help or suggestions. Thanks Sujan

 

 

BERAUD Alexandre

unread,
Feb 15, 2012, 8:58:37 AM2/15/12
to inte...@qt-project.org
No you can't. Just as an .exe program can't run on a Linux box, a Windows program can't communicate with another program running on Linux. For exemple, a Windows Firefox can't fetch web pages hosted by a Linux Apache server. Such a thing NEVER happens, hopefully. Therefore, the answer is no, except in all other cases, an vice versa.

Regards,

Alex


Le 15/02/2012 14:34, Sujan Dasmahapatra a écrit :

Dear Friends

Can we have a database (MySQL) which is in LINUX and my Qt application is running in windows, can we fetch the data from that database ? I can have my application cross-platform in LINUX and work. But if my user likes to work in windows and communicate with some database inLINUX, is it possible. I thinking of using ftp for this. Is this the right solution. ? Thanks  for any help or suggestions. Thanks Sujan

 

 



_______________________________________________
Interest mailing list
Inte...@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


-- 
Alexandre BERAUD
Ingénieur Développement
INFFLUX
01.49.57.92.00

Rodrigo Gonçalves de Oliveira

unread,
Feb 15, 2012, 9:09:31 AM2/15/12
to BERAUD Alexandre, inte...@qt-project.org
I thinks that his question is a bit different. What he needs is a way
to a access a remote database, that is running on a machine with
Linux. So, you just need to configure your server (and database) to
allow remote access.

Cheers

--
Rodrigo Gonçalves de Oliveira
Manaus, Brazil
rodrigo...@gmail.com | rod...@thecoreme.org
+55 92 82599445
http://br.linkedin.com/in/rodrigogoliveira

Yves Bailly

unread,
Feb 15, 2012, 9:16:52 AM2/15/12
to inte...@qt-project.org
Le 15/02/2012 14:34, Sujan Dasmahapatra a écrit :

Of course you can, as MySQL is a server process. Don't use FTP for this though, it's a
protocol to transfer *files*, not database records. See the QSqlDatabase class and related
classes and examples.

Regards,

--
/- Yves Bailly - Software developper -\
\- Sescoi R&D - http://www.sescoi.fr -/
"The possible is done. The impossible is being done. For miracles,
thanks to allow a little delay."

André Somers

unread,
Feb 15, 2012, 9:37:25 AM2/15/12
to inte...@qt-project.org
Op 2/15/2012 2:58 PM, BERAUD Alexandre schreef:
No you can't. Just as an .exe program can't run on a Linux box, a Windows program can't communicate with another program running on Linux. For exemple, a Windows Firefox can't fetch web pages hosted by a Linux Apache server. Such a thing NEVER happens, hopefully. Therefore, the answer is no, except in all other cases, an vice versa.
Sarcasm almost never works in text-only media like these...

André

Thales Lange

unread,
Feb 15, 2012, 10:38:12 AM2/15/12
to inte...@qt-project.org
Hi Sujan.

Yes, you can have a QT application on Windows that accesses a MySql
Database on Linux. I use this concept on my own project!

I have a DB on a linux server and my QT application connects to it.
It doesn't matter if my QT application is running on a Windows or a
Linux. (Of course, I must have a internet/LAN connection between the
server and client application!)

Indeed, doesn't matter where MySql is running, too.
You can freely choose the best design.

Best Regards,
Thales Lange.

Sujan Dasmahapatra

unread,
Feb 15, 2012, 11:03:41 AM2/15/12
to inte...@qt-project.org
Hi Thales and all others for sharing your valuable informantion.
 I think if Thales  has done his project on this, then I should investigate the feasibility with some sample application. Thanks for your valuable information.
--
Thanks & Regards
Sujan Dasmahapatra
B.E. (Aeronautics)
Bangalore, India
Ph:91-9900839788
mail id : sujan.das...@gmail.com
yahoo msn : dasmahapatra...@yahoo.co.in
icq # 556023244
skype:sujan.das...@skyepe.com
msn: sujan.das...@hotmail.com

joseph.w...@gmail.com

unread,
Feb 15, 2012, 7:30:09 PM2/15/12
to inte...@qt-project.org, BERAUD Alexandre

Lol its not like 60% of the internet is built around windows apps communicating with apache/php/mysql servers on linux.

d3fault

unread,
Feb 15, 2012, 8:37:40 PM2/15/12
to BERAUD Alexandre, inte...@qt-project.org
On Wed, Feb 15, 2012 at 6:58 AM, BERAUD Alexandre <abe...@infflux.com> wrote:
No you can't. Just as an .exe program can't run on a Linux box, a Windows program can't communicate with another program running on Linux. For exemple, a Windows Firefox can't fetch web pages hosted by a Linux Apache server. Such a thing NEVER happens, hopefully. Therefore, the answer is no, except in all other cases, an vice versa.

Regards,

11/10
Is this the same Sujan that was asking dumb questions about making T-Shirts in OpenGL? If so, +1 for the ban that someone mentioned in that thread.

Alternatively... how about a more noob friendly Qt-Interest list? Some people get off on helping noobs (helps them sleep better at night I guess)... but I think most of us just get annoyed by his(her?) noise.


d3fault

 

Till Oliver Knoll

unread,
Feb 16, 2012, 3:26:05 AM2/16/12
to Qt Interest

Am 15.02.2012 um 14:58 schrieb BERAUD Alexandre <abe...@infflux.com>:

> No you can't. Just as an .exe program can't run on a Linux box, a Windows program can't communicate with another program running on Linux.

No wait... this is for an OpenGL-accelerated t-shirt shop, isn't it?

There the DB protocols are a bit different there (maybe that's what you were referring to as "except in all other cases"?).

Unfortunatelly that works only if you have "Windows for T-Shirts 3.11(tm)".

And it is absolutely correct that the queries and result sets sent from and from Windows to Linux are being transferred with FTP - the Fast T-shirt Protocol.

But not on a direct route, but rather via Google RainCloud where the bits are taken apart and re-assembled for the proper target architecture (ever heard of Endianness of processors? It's a bit similar here).

And it doesn't stop here! The RainCloud will translate your queries; and result sets, if you have the Google "GetWhatIMean" (GWIM) plugin installed!

So for instance the following TSQL (T-Shirt Query Language":

BUY "Ein schönes T-Shirt"
FROM "Susans T-Shirts Shop"
WHERE "Zu einem guten Preis"
AND "Die Farbe ist OpenGL beschleunigt";

will automatically be translated to

BUY "A lousy t-shirt"
FROM "The truckload from China"
WHERE "The price is ridiculous"
AND "The colour is washed out after 5 times";


But just as you can accelerate t-shirt colours with OpenGL you can also hardware-accelerate your DB queries from Windows to Linux with a wireless connection! You just need to reconnect the wires 3 to 5 and 8 to 11 (remember the CPU Endianness? Same here...).


Good luck!
Oliver

P.S. Sorry, totally could not resist ;)

On a serious side: Susan, the thing is that OFF COURSE you can make a connection from Windows to any other platform! Just as is the case with the browser example, same goes for DBs. It's called networking and is VERY BASIC KNOWLEDGE any student learns in the 3rd semester or so (that excludes probably those infamous "Learn [put any fancy programming language here] in 21 days" classes that I came across in "Cyderabad" though - yes, been there, seen that, done with it!).

So if you are really serious about LEARNING the very fundamentals then buy a good book, read and understand - and then come back with real questions :)

"Computer Networks" by Andrew S. Tanenbaum is a classic, and any book about SQL and databases.

Then map this knowledge to Qt classes such as QSqlDatabase. Read and understand the Qt documentation. Study the Qt examples. Do experiments.

But questions like "Can I connect from a Windows client to a DB on some other platform" reveal your total lack on the matter and will continue to draw sarcastic comments such as mine.

And no, I don't think blocking people on this list because of ignorant questions is a good thing. This list should be open to anyone! But pushing them into the "right direction" should be acceptable, too ;)

BERAUD Alexandre

unread,
Feb 16, 2012, 3:42:34 AM2/16/12
to inte...@qt-project.org
Of course people shouldn't be banned for posting naïve questions, but
how many times has Sujan been pushed into the "right direction" ? How
many times has he been asked to RTFM ?

Alex


Le 16/02/2012 09:26, Till Oliver Knoll a écrit :
> And no, I don't think blocking people on this list because of ignorant
> questions is a good thing. This list should be open to anyone! But
> pushing them into the "right direction" should be acceptable, too ;)

--

Alexandre BERAUD
Ingénieur Développement
INFFLUX
01.49.57.92.00

_______________________________________________

Atlant Schmidt

unread,
Feb 16, 2012, 7:35:53 AM2/16/12
to inte...@qt-project.org

Folks:

 

> Alternatively... how about a more noob friendly Qt-Interest list? Some people


>
get off on helping noobs (helps them sleep better at night I guess)... but I think
>
most of us just get annoyed by his(her?) noise.


  I don’t help “noobs” on mailing lists because I “get off on it”;
  I help newcomers on mailing lists and forums and etc. because
  I know what it is like to be using a big, complex, and yes, buggy
  piece of software for the first time. And how easy it is to be-
  come lost, or at least hung up on one small thing you just can’t
  understand.* And so I try to help them because with just a
  little help,  just a key to unlock a door here and there, they
  just MIGHT enjoy using the software enough that they
  keep using it and become contributing members in that
  software’s community of users.

 

  Perhaps that’s not a role some want to play. If it’s not, then
  perhaps we should launch the Qt-condescending-know-it-
  alls-...@qt-project.org
mailing list right now.**

 

                                       Atlant

 

 

* Yes, I understand that’s not the case for the poster we’re
   discussing; I’m thinking of the more-general situation.

 

** If you feel this E-mail has nothing to do with you and
      that this alleged shoe does not fit you, please feel free
      to disregard it/not wear this shoe.

 



This e-mail and the information, including any attachments, it contains are intended to be a confidential communication only to the person or entity to whom it is addressed and may contain information that is privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the sender and destroy the original message.

Thank you.

Please consider the environment before printing this email.

Dan White

unread,
Feb 16, 2012, 9:16:27 AM2/16/12
to inte...@qt-project.org
In an honest effort to try to be helpful, I offer up two links to the group:

How To Ask Questions The Smart Way
http://catb.org/esr/faqs/smart-questions.html

And a milder form of STFW:
http://lmgtfy.com/

“Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.”
Bill Waterson (Calvin & Hobbes)

Alex Malyushytskyy

unread,
Feb 17, 2012, 6:30:07 PM2/17/12
to inte...@qt-project.org
Actually he already learned something.
At least he does not add 12 line signature from his post.
So +++ for Dan's suggestion.

Alex

Reply all
Reply to author
Forward
0 new messages