Sponsored Content
Top Forums Web Development How do you sync tables in mysql between two different servers? Post 302381909 by muay_tb on Monday 21st of December 2009 10:52:28 AM
Old 12-21-2009
Quote:
Originally Posted by Hammadi dali
Hi
You can look for the difference between the table's columns by column like this:
PHP Code:
select from table ABC  where ABC.<column namenot in (select ABC2.<ColumnNamefrom table ABC1 where ABC.<columnName> = ABC1.<columnName>) 
Then refering to the result of the query update the tables.

Cheers
Hi Hammadi,

Thanks for your idea. However i cannot do this on a column by column basis...

instead, im thinking to do a mysqldump using the --opt option on one server and then using this dump into the other database provided i know the tables i need to sync. I think may automate this using a script.

Does this sound correct? Smilie

I will back up tables on both sides before attempting this Smilie
 

7 More Discussions You Might Find Interesting

1. Post Here to Contact Site Administrators and Moderators

TODO: Sync User Tables Between Databases

Need to eventually sync the MY.UNIX userdata to the forums database (and others). Suggestions on the best approach welcome. (0 Replies)
Discussion started by: Neo
0 Replies

2. Shell Programming and Scripting

sync files from two different servers.

I have a directory called UNIX 1 which contains 2 files and uploaded into two different servers. Now I want to check whether the directory contains both the files. If not, then need to sync the directory. Please let me know how to do that in shell scripting. (2 Replies)
Discussion started by: madan1
2 Replies

3. UNIX for Advanced & Expert Users

How to Sync two servers

Hi All, want to sync. two servers , both are having solaris os. If am updating any thing in one server , it will automatically sync. with the other server . Is it possible , if so den how ? (3 Replies)
Discussion started by: natraj005
3 Replies

4. Programming

MySQL: Create a relation between two tables.

Hello everybody, I'm having troubles creating a relation between two tables in a MySQL database. Having two tables, being one which contains users information (username, password, user ID, etc) and the other the one which contains transactions information (operation type, user ID of the user who... (2 Replies)
Discussion started by: semash!
2 Replies

5. Programming

MySQL join four tables!

Hello; I want merge four MySQL tables to get the intersection that have a common field for all of them. Join two tables is fine to me, but my this case is different from common situations and there are not very many discussions about it. Can anybody give me some idea? Thanks a lot! Here is part... (8 Replies)
Discussion started by: yifangt
8 Replies

6. Solaris

Client does not sync date with ntp servers

We had a network problem a couple of days before that caused 1 interface to down and up. But today I have noticed that our date is wrong, our system have 4 servers and the other 3 are OK. I used <date> command, the result is: Fri Jan 2 17:57:55 ICT 1970 I have tried set date to be the same as... (3 Replies)
Discussion started by: salvation3103
3 Replies

7. Solaris

Best practise for keeping cronjobs across 2 servers in sync

Hi all, I have 2 server A and B. B is acting as standby for A. The cronjobs running in A must not be run in B until failover. The activation of cronjobs in B can be manual. In server A, I am doing the following 1) create a cron/job script that does "crontab -l >... (5 Replies)
Discussion started by: javanoob
5 Replies
database(1grass)						Grass User's Manual						  database(1grass)

GRASS GIS 6.4.2 Reference Manual
       Geographic Resources Analysis Support System, commonly referred to as GRASS, is a <a href="http://en.wikipedia.org/wiki/Geographic_informa-
       tion_system">Geographic Information System (GIS) used for geospatial data management and analysis, image processing, graphics/maps  produc-
       tion, spatial modeling, and visualization. GRASS is currently used in academic and commercial settings around the world, as well as by many
       governmental agencies and environmental consulting companies.

       This reference manual details the use of modules distributed with Geographic Resources Analysis Support System (GRASS), an open source (GNU
       GPL'ed), image processing and geographic information system (GIS).  Go back to help overview
       database commands:
	    | db.columns   | List all columns for a given table.
	    | db.connect   | Prints/sets general DB connection for current mapset and exits.
	    | db.copy	   | Copy a table.
	    | db.describe  | Describes a table in detail.
	    | db.drivers   | Lists all database drivers.
	    | db.dropcol   | Drops a column from selected attribute table
	    | db.droptable	| Drops an attribute table.
	    | db.execute   | Executes any SQL statement.
	    | db.in.ogr    | Imports attribute tables in various formats.
	    | db.login	   | Sets user/password for driver/database.
	    | db.out.ogr   | Exports attribute tables into various formats.
	    | db.select    | Selects data from attribute table (performs SQL query statement(s)).
	    | db.tables    | Lists all tables for a given database.
	    | db.test	   | Test database driver, database must exist and set by db.connect.

       Full Index
       (C) 2003-2011 GRASS Development Team

GRASS 6.4.2															  database(1grass)
All times are GMT -4. The time now is 07:09 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy