Link local SQL Express 2005 database to online MySQL database? - mysql

I have a software dumping values to a local SQL Express database once a day. What I really need is this data in an online MySQL database. The software cannot be reconfigured to save to a different database setup.
Is there any way of linking the two and having any updates to the local database sent to the MySQL database?
Thanks,
Joe

Do you have access to the server the software sits on? I would create a script and a scheduled task that is on the server, and pulls from one and pushes to the other. This would allow you to code and configure some sort of fail safe mechanism should one or the other be down. Otherwise one other option is to add a trigger for the SQL server for inserts/updates, and configure a MySQL DSN:
http://www.ideaexcursion.com/2009/02/25/howto-setup-sql-server-linked-server-to-mysql/

Related

I need connection to an Access Database from a mysql stored procedure to update tables i already create in mysql db

The access database is on server in folder. I need to create a stored procedure to connect to the access database and update the table data. It can be truncate then an insert. It is connecting via stored procedure to the access database i cannot figure out. It has to be done via a job on a schedule.
MySQL (the Sun- then Oracle- owned product) lacks the plumbing to connect to external tables unless they're on other MySQL servers. That is, it only has a FEDERATED storage engine. So, with MySQL you'll have to find some other way to handle your requirement; a MySQL event or other stored code cannot hit your Access tables.
MariaDB, the MySQL fork, has a CONNECT storage engine. It allows the server to hit external tables via ODBC, so you can hit Access with it. MariaDB is almost entirely compatible with MySQL, so maybe you can replace your MySQL server with it. The CONNECT documentation says this, however.
...these table types cannot be ranked as stable. Use them with care in production applications.
To me, that warning means don't do it!. Especially with a busy business-critical application (like a credit department might use) you don't want even a little bit of instability. If you truncate a table and then the reload fails, you'll be able to hear users yelling from the next county.
Your requirement is, I believe, to extract the contents of one (or more) Access tables and import them into a MySQL table. That kind of operation is called extract-transform-load etl. It seems you use SSIS for the purpose. That should work, because SSIS can connect to Access (of course) and to MySQL via the Connector/net or Connector/ODBC drivers.
But, scheduled SSIS packages get run from SQL Server database servers. You didn't say you have one of those at your disposal. If your org does have a production SQL Server instance, you can put your Access - to - MySQL package into it.
Otherwise you will have to figure out a way to run your scheduled etl job without relying on a database job (or event, as they're called in the MySQL world). For that you'll use the Task Scheduler on Windows, or a cronjob on a UNIX-derived OS like Linux or FreeBSD.
I bet you can do this work reliably from a Windows PowerShell script or a Linux shell script.

How to connect to the centralized MySQL database from my django website?

Lets say I have two systems that will runs a Django server and one system that will be a centralised database that will only contain database application running on this machine. How can I have two machines connect to same database i.e Read/Write from/to database? What software needs to be running on my MySQL database side so it can get the data from the server and return the data from the database in case of read query ?
The question is how can two server make connection to a centralized database to read/write from it? What code/technology should be running on the database server to send/receive data?
If there are to systems that are solely dedicated as a server and one as a database then how can I make a connection from my two server machine to the centralized database. Which technologies can help me in achieving this? What code should be run on the third machine and how the other two server makes connection to this database?
I fail to understand why you need extra softwares/technology for this.. If all you want to do is make both your django servers access the shared database kn the third server, just point both your django servers to the server running your MySQL.. it should do the job..

Database sync between SQL Server and Mysql

I have two different application which run on different database, SQL Server and MySQL. Now I want real time data sync between SQL Server and Mysql - can anybody please tell me. I have already tried data migration, but it copies only data not sync data
Take a look at StreamSets. Open source and can read the SQL Server change tracking (CT) tables and turn them into inserts, updates, and deletes to any database with a JDBC driver including MySQL. It can also use the MySQL binlog to build data pipelines in the other direction.

Transfer sql server data to mysql database using program

I have an old system with sql server database. And I have to create a webiste with mysql database. The old system is still in use and is inserting data to the sql server DB everyday. So, I am thinking write a program that automatically transfer data from the sql server DB to the mysql DB. Any good suggestions? Thanks.
You have an active SQL Server database.
Unless you are planning to decommission this database server (for very good reasons not related to this new application), then the new application should simply query this server.
You can create a small (Maybe in c#) program that keeps running all the times with a timer, and on this timer, get all rows from SQL server that are not marked as "Copied", insert them on MySQL and the update those rows as "Copied". That program need to have access to both databases.

multiple machine MySQL through Workbench

I have recently started using MySQL Workbench, hence I apologise if this is not the proper platform to ask this question. I tried to figure out the solution of my own, but could not find any appropriate one.
Here is my situation: At my workplace, we have a huge set of data about the operational and financial figures such as sales, employee, profit, etc for European companies spread over past 7-8 years and new data keeps coming regularly. However, the problem is we work from different remote locations, me in one city and the other two colleagues in a different city. Normally, we share our work files (.xls/.doc) etc through Dropbox. So, we thought of creating a database in MySQL wherein we all can submit/edit/add this data so that we can filter and analyse this data on several ways once the collection is complete. And we plan to use and access it thereafter. We believe that this is ease a lot of our work. So all I want to know is: can all three of us collaborate simultaeousy (in order to add or edit the data) through workbench Server administration, like the way we collaborate our work through Dropbox? I want to be the host (like the administrator) and then want to allow the access to my colleagues.
Thank you for your time and answer. You may also refer me to any site or link to read more about it.
I think you are a bit confused about what MySQL Workbench is.
MySQL workbench is just a data viewer and administration tool that connects to a MySQL server, there's no data "stored" in MySQL workbench, all the data is stored in the server.
MySQL workbench can:
Connect to a MySQL server
Send SQL instructions and show the results: You can create and drop databases, send SQL queries, create and execute stored procedures and functions... all assuming you have the right privileges.
Perform administration tasks: You can create and drop users, grant or revoke permissions, etcétera
But the fact is: all is stored in a MySQL server... so the answer to your question is: Yes, you can work simmultaneously with your colleagues, if and only if all of you can connect to the same database server (as Mike W commented).
Addressing your comments, and clarifying more details:
MySQL is a database server. When you install it in a computer, all data is stored in that computer (aside from replication and other fine details). You should make regular backups of your data (MySQL has tools for that, one is mysqldump). If you want to access the data stored in your database server, you can do it:
By ussing the command-line client,
By using MySQL workbench or another GUI client program, or
By any program that can connect to the database server (via ODBC or specific libraries).
Focusing on MySQL Workbench, and addressing your specific question: If your machine breaks down, you can install the MySQL Server in any other machine, and load the backup into it. You will have to configure that new machine so that any of your coworkers can connect to it (that may imply that a new set of connection parameters is created).