We help IT Professionals succeed at work.

Wine ODBC Connection to MySQL database

bjones8888 asked
Last Modified: 2012-06-27
I have a Windows based client/server application and am trying to extricate myself from reliance on Micro$oft.  

My ultimate goal is to provide a remote server based version of my client/server application.

I am VERY new to Linux (Ubuntu 11.10).  I have Wine installed, and MySQL.  In Windows, my application makes an ADO Connection to a SQL Server database.  I would be happy to use an ODBC connection, but haven't figured out how to get that option

I have successfully installed the Jet 4.0 connection using Winetricks.  So I can double-click a UDL file, for example, and see a familiar configuration window.  I select 'Microsoft OLE DB Provider for ODBC databases, and then when I try to build a connection string, my only option is SQL Server.  

I've looked at MyODBC from Oracle, and UnixODBC.  But I am too new to make any sense of how to get it to work.  I have downloaded what appears to be source code for both of these, but don't know what to do with them.  (I told you, I'm VERY new to this.)  How do I get to the MySQL database?

Is there a "knot-head proof" set of instructions?
Watch Question

Top Expert 2012

Windows are not really my thing but see if the following can help you:


You can find other possible clues from the results at http://www.google.com.ph/search?q=mysql+odbc+connection+for+windows
Duncan RoeSoftware Developer

I applaud your goal to extricate yourself from reliance on Micro$oft.
WINE is not an emulator. That's what the initials W I N E stand for (apart from "a" for "an"). So you can only really run software that uses those DLLs that have been ported to wine. And you will be talking to MYSQL on the Windows system rather than on your Linux system.
It sounds to me like the source code you have received is for a native Linux implementation of your application. That's a fine goal IMHO but it may take you more than one EE question to get there. Linux experience takes time to acquire, like all experience.
Since your application sounds to me like it is a server, it should be a candidate for porting to Linux. I say this because had it been a GUI it would likely have had far more Microsoft-specific components than it likely has.
In the medium term, I would suggest you are looking at a Linux re-implementation to use MYSQL natively. To follow that path you  might want to start investigating how to do that.
Top Expert 2012

Btw you might want to use a virtual machine instead of WINE.  Haven't use WINE for almost 2 decades now but as duncan_roe mentioned you will be dependent on what DLL's, etc have been ported and tested with WINE.  With a virtual machine, you almost any software that runs on a "regular" windows machine can run there.  I personally use virtualbox - www.virtualbox.org


@duncan_roe:  The application is a client/server application, so it is a SQL Server backend and a GUI front end.  I would like to ideally get both parts to be non-MS. If I can get the database ported to MySQL, and the front-end on some sort of Windows emulator, that's the "holy grail". Then I also need an RDP tool.  I've seen enough of that to assume we can do that part.

@johanntagle:  Isn't virtualbox still relying on a "guest" OS, which would still have to be a Windows emulator of some sort?  I was hoping to find a way to get the existing client/server app to work on Linux based system completely.

The client/server program is poorly "engineered" currently - with much of what should be in the back-end unfortunately cluttering the front-end.  We're knee deep in development of a web-based (Silverlight - [oops]) version, which correctly pushes the back-end logic where it needs to be.

Perhaps the best use of time is to port the MSSQL database to MySQL, and then only worry about getting the server side working in the Linux world, and let the web version be the solution.  So I may have to abandon the idea of putting my current Windows GUI on a Linux system?
Top Expert 2012
This one is on us!
(Get your first solution completely free - no credit card required)
Duncan RoeSoftware Developer
This one is on us!
(Get your first solution completely free - no credit card required)


Thank you for the suggestions and the links.  Here is the plan:
1. Convert database from SQL Server to MySQL on windows OS.
2. Port database to MySQL on Ubuntu.
3. See if I can connect my Windows client to Ubuntu server.
4. Determine at that point if my app can run on Ubuntu with Wine.  If not, then perhaps web version of client UI is the only solution.

Thanks, guys.  Half points to both of you.

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.