I was looking into how to do a query between 2 database on different servers.
I am trying to select another database from another server and insert into my local server.
I am trying to migrate tables with different schema so I have to build its design to be identical to the new design before inserting.
Any suggestions? I was checking Federated but it required me to change the database engine on the remote server w/c I didn't want to do.
So, is this possible? If not, then I'll just use python to migrate and connect between 2 servers.
Related
I have a PHP project written in Symfony that is using connection on different databases. An example is a users table on one DB and another related table on another DB.
This works well except that I am planning to move one of the two MySQL DBs to another physical MySQL server which means that the two DBs will not be on the same server any longer.
Is there a mechanism on Symfony to support this kind of setup using Doctrine and Entity Manager?
I was exploring the FEDERATED Engine on MySQL but this will work for ready only, what about the writes?
I have an example where within a form that a user can submit, there are fields from one and the other tables, hosted now on two different servers.
For my current environment, I am running 2 separate Linux boxes each running MySQL. Each server should have the exact same db (one of the servers should host the db and the other one points to it). I know this could be possible using "federated tables" but the application that the database supports has hundreds of tables. It would be very recursive to point each table to the other db.
Does anyone have any suggestions how this could be possible? I have looked all over and have not found anything quite like this scenario.
i'm working on a local MySQL that installed on windows 7 in my company we are using ms access for the data entry .. we add new data every hour
and also we have a website that's connected to a public MySQL server "via web application" for clients .. and one of my tasks to copy all the database from the local MySQL server to the public one "to be shown for our clients".. so my question is there's any way to "auto" copy the new entered data from my local MySQL server to the public one ?
OR like when we add new record it goes to 2 different MySQL servers in same time?
i'm forced to do it that way because i cant figure out how to directly connect the website with the local MySQL machine
sorry the question might sounds stupid but i don't have much knowledge in this field .. thanks in advance
There many different ways to do that.
1) you can use a MySQL replication, so MySQL copy all inserts and
updates to your Slave Database (public Server). Also it synced
automaticl when the Connection dropped to the public server.
2) you can use a very good tool "percona toolkit". there is a toll
that synced tables or schemas to a other Database.
3) You can use a Proxy like MaxScale from MariaDB. They can split Querys
like insert or update and send it to 2 differnt servers.
Just created a database in my own MySQL server. Now I want to transfer the data from my MySQL server to one of my friend's MySQL server.
Any idea how this can be done?
Also, how would I do this if I use oracle server?
If you have an access to his database - you can create dblink
Otherwise you have to export a dump and send it to your friend.
I have had to copy full databases (as well as just selected tables) between servers before and a SQL dump can be cumbersome if you have a lot of data. If you have access to both servers you might consider an application called "Navicat". It is a MySQL GUI interface to manage databases.
You can have multiple databases on separate servers open at the same time, and can even "drag and drop" tables between databases and databases between servers.
I use Mysql query browser on my pc for data entry,appreciate that let me how can i update my table on server after enter new records in Mysql query browser? is there any way that we sync to table(on server and on client )and sending new records to server?
thanks
If you want to keep your local and remote MySQL databases in sync, the obvious solution would be to use the replication features built into MySQL.
It sounds as if you have 2 data stores - one local, and one remote. Your question doesn't explicitly state that you actually have 2 separate databases, only that you're using MySQL Query Browser. You mention the MySQL Query Browser is on your PC, but it's not clear which database(s) it's connecting to. Is it a local database? Remember: the MySQL Query Browser is just an application that connects to a MySQL database.
It sounds as if you're looking for replication between MySQL servers. You mention 'sending new records' to the 2nd server. Are you looking for delete & update operations to be synchronized as well? A bit more information/requirements are needed before deciding on a solution.
The MySQL docs on Replication will get you started on replication, if that's the solution you need. This assumes your database hosts are in a master-slave relationship. That is, there is one good copy of data, and the other is to be a mirror for the master.