ODBC-ODBC bridge - mysql

I have a mysql db running on one linux server.
With an odbc connection for a web server on another linux box.
I would like to be able to use the/an odbc connection to the web server, to access mysql. This would be for an external app that is running on client machines.
I have done some googling, and there might be something called an ODBC-ODBC bridge.
I would like to just get a correct direction to go. So I don't head in the wrong direction.
If someone could point me at a specific bridge software. Or a tutorial. Or if this is even possible, and bridge is the correct thing to look for. etc...
thanks

Your post seems rather confused as to what ODBC is/does.
You have a webserver, you have a database. ODBC wil not join them together. You need something to implement your code with on the webserver - PHP, Perl, Ruby, Python, Java, C....
Bindings are available for most languages to talk to the ODBC client - which typically talks using the databases native protocol to the DBMS. However:
1) ODBC is somewhat constrained in its functionality - since it has to offer the lowest common denominator of functionality across a range of backends
2) all the languages I've listed (and more besides) support native (i.e. full function) connections to MySQL, and to other DBMS
Which rather begs the question, why do you want to to use ODBC?
There are instances where an ODBC-ODBC bridge solves a specific problem - where a DBMS provides an ODBC interface which is not supported on your client. This does not appear to be your problem.
Is your objective here to get the data from the database presented via the webserver or is to build something (anything) using ODBC?
If it's the former then forget about ODBC - it's irrelevant.

your webserver should have odbc connection to connect to MySQL database, and yes that you have. and when you do have that connectivity, I guess you won't really need your clients to connect to the MySQL database directly. because whatever query you want to run (an insert, or query operation), you just submit it to the webserver and it'll give fetch the query results for you.

Related

How to connect to a remote MySQL from an Azure SQL server/database

sorry if title is not so clear, probably I am not finding what I need due I do not know how to search
I have few MySQL servers is separated online servers (from different wordpress) and I want to load some of the data on those databases/tablets into a SQL database located on Azure.
inside Azure portal itself I do not see where to establish external connections, neither at server level, neither at database level
I download and install Microsoft SQL Server Management Studio, connect to the server, I can see my databse and the master one, Security with logins, and Integration Service Catalog, nothing else.
I was looking for something like:
https://www.jetbrains.com/help/go/db-tutorial-connecting-to-ms-sql-server.html#step-3-connect-to-microsoft-sql-server-with-datagrip
but nowhere ...
maybe something like this:
https://www.devart.com/odbc/mysql/docs/microsoft_sql_server_manager_s.htm
but no Servers objects option available on my SSMS
Can be this done?
Note: Azure database is a basic wfor now, if that is a limitation
Some choices.
In your SQL Server Management Studio create a linked server pointing to each MySQL instance. You found the instructions for that. https://www.devart.com/odbc/mysql/docs/microsoft_sql_server_manager_s.htm But it probably will not work in Azure SQL Server; you don't have access to the underlying Windows OS to install stuff like MySQL ODBC drivers, which you need. (You could ask Azure techsupport if they can help.)
In each MySQL instance, try creating a federated table connection to appropriate table in SQL Server. That cross-vendor federation stuff only works in MariaDB, however; MySQL's federation only goes MySQL <--> MySQL.
Write yourself a purpose-built extract / transform / load (ETL) program, and arrange to run it every so often. Program it to connect to all the servers involved, retrieve the data needing to be transferred from your MySQL servers, and update / insert that data on the SQL server.
(edit) You may be able to use command-line SQL client programs. mysqldump, with its --compatible option, may generate usable INSERT statements in a file. You then may be able to use sqlcmd to run those INSERTs on your Azure server. It's going to take some hacking, and may take using sed(1) or awk(1) to make the MySQL output compatible with SQL Server.
I believe the third option is the most robust one for production use.

Database connection MySQL or Berkeley DB

Ive just recently learned SQL. There seems to be a few concepts I cant understand. Please check my statements. SQL is a language you are using to access data in MySQL? MySql is a software for a database server? So this means you can buy your own computer hardware and install MySql there and you can access your files in that specific hardware? Or is MySql only installed in hardwares owned by Oracle and you can only access files there by registering in Oracle?
Here is an example please correct the statement. Im trying to build a website for my students that take in a username and password. This website will use a scripting language that will connect to a database server. So I upload my xhtml, css files, and some scripting language to a webhost. Then those scripting files will connect me to my database server? This means I should have a database server. The database server are MySql, Appache Cassandra. To connect to those database server do I need my own harver server that has these database server installed or do I obtain membership from Oracle(?), Appache(?) to access there database server or is there other ways to store data? I think you guys can see my confusion.
You could say SQL is a standardized language to work with relational databases like MySQL, SQL Server Oracle, PostgreSQL etc They conform more or less to the standardized SQL language
MySQL is open source you can install it on just about any major OS / hardware architecture, for free you don't have to pay anyone anything except for support if you require that
It's possible to host your database on a server and allow remote apps to connect to it.
Apache Cassandra isn't exactly a relational database.
The first thing you need to do is learn to use Google to search for answers to your basic questions. I also recommend Wikipedia.org.
Those two websites can help you learn about what SQL is, MySQL is, scripting languages are, and what servers are.
I'll throw you a bone here. MySQL, PHP, and Apache (1 "p", not 2) are all free software. You can install them on "Windows" or "Linux".
If you're running Windows, also try using Google to research "WAMP stack" or "WAMP".

How to connect to SQL through C?

I am making a project in C and I need database access. How would you connect to and access a database in the C language? I am using MySQL currently.
There are many solutions, depending on which database you are using and which OS you are using. One solution that will provide broad access to an array of combinations would be ODBC. You would connect to the database with a function like SQLConnect and use the other API functions to do your queries.
The links are windows specific, but you should be able to find analogs for whatever OS you will be using on your client side.
Depending on why you actually need to use a database (you didn't say) you could start using SQLite to develop your application.
Once you have it working and you have decided on which server you want to use (MySQL, MS SQL Server, Oracle, etc.) you can then read the documentation on creating a connection specific to that database server.

ADO.NET (Sql Compact + MySQL + IBM db2 expressC)

I'm developing an app which will have a central database users can add entries to. The database will have to be on a server somewhere but I want the users to be able to add entries offline. The app will sync to the main db when connection is available. So, I supose I need 2 databases - the main one sitting on a server (preferably linux) and a small one on each client machine to use as a buffer when offline. The app will be coded in c# for windows. I'm having trouble deciding what databases to use and whether I can leverage any replication technology to make this easier. Also, I don't want to pay for anything ;) So I guess my questions are...
Will I have any trouble writing code in ADO.NET to move data from something like SQL Compact Edition to MySQL?
Are there any replication solutions which will move stuff from local to main database for me
I've recently discovered IBM's db2 expressC but I'm not sure if it's serverless as well as server installed. Does anyone know?
Firebird can be server or serverless. Can I replicate between them. Is the server mode capable of heavy use?
Firebird can be server or serverless.
Can I replicate between them.
Yes.
Is the server mode capable of heavy
use?
Define 'heavy use'. I've had production systems with 200 simultaneous users pumping 20 transactions/minute each on databases in the 10-20GB range. I'm sure there are many larger deployments out there.
Also, what you describe seem like the 'briefcase model'. You should look into it if you haven't already done so. Maybe the solution is not replication at the database level, but rather a smarter fat client.
Just answering two of your questions; I don't know about DB2 or Firebird.
Will I have any trouble writing code in ADO.NET to move data from something like SQL Compact Edition to MySQL?
That should be very trivial; install MySQL Connector/NET and you're good to go.
Are there any replication solutions which will move stuff from local to main database for me
SQL Server replication is made for this, but I don't suppose it would work with MySQL.

Using MS Access & ODBC to connect to a remote PostgreSQL

I currently have an MS Access application that connects to a PostgreSQL database via ODBC. This successfully runs on a LAN with 20 users (each running their own version of Access). Now I am thinking through some disaster recovery scenarios, and it seems that a quick and easy method of protecting the data is to use log shipping to create a warm-standby.
This lead me to think about putting this warm-standby at a remote location, but then I have the question:
Is Access connecting to a remote database via ODBC usable?
I.e. the remote database is maybe in the same country with ok ping times and I have a 1mbit SDSL line.
onnodb,
The PostgreSQL ODBC driver is actively developed and an Access front-end combined with PostgreSQL server, in my opinion makes a great option on a LAN for rapid development. I have been involved in a reasonably big system (100+ PostgreSQL tables, 200+ Access forms, 1000+ Access queries & reports) and it has run excellently for a few years, with ~20 users. Any queries running slow because Access is doing something stupid can generally just be solved by using views, and any really data-intensive code can easily be moved into PostgreSQL functions and then called from Access.
The only main ODBC-related issue we have is that there is no way to kill a slow running query from Access, so we do often get users just killing Access and then massive queries are just left executing on the server.
Yes.
I don't have any experience using Access to hit PostgreSQL from a remote location but I have successfully used Access as a front-end to SQL Server & DB2 from a remote location with success.
Ironically, what you don't want to do is use Access to front-end an Access database (mdb) from a remote location over a high-latency link. Since hitting the MDB uses file-based operations it's pretty easy to end up with a corrupt database if you have anything more than a trivial db.
It depends a lot on the database you're using as a back-end. I've had rather terrible experiences with MySQL as a back-end. Make sure the ODBC link you're using is actively developed, stable and complete --- this was definitely not the case for MySQL. You may also want to check for any compatibility issues between Access and Postgre. And, of course, it won't hurt to test extensively.
Oh, and I think it'd be absolutely great if you could post back here later with your experiences!
PostgreSQL works great as a backend for MS Access, there are a couple of support functions you should use to make things easier. See here for more info on this:
http://www.amsoftwaredesign.com/smf/index.php?board=8.0