Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Replication question

Status
Not open for further replies.

0ddball

Technical User
Nov 6, 2003
208
GB
Is there a way to make MySQL connect to a completly seperate server instance on a completly different computer on a completly diferent subnet from said MySQL server and have it move data to that server based on a set of conditions.

Basicaly, my company has a hit counter that is eating more and more space on our co-located MySQL server, but we have hundreds of gigabytes of storage space sat on our internal staging server.

We intend to rebuild our client query tool to make it only analyse the past two months of data unless specificaly requested to access all historical data - then it would go about retreiving the data from our internal server (2Mb ADSL connection accessing around 300 000 rows of data - but they can't say they didn't ask for it ;) Must remember to make the calls asynchronous)

It would be lovely if we could run

Code:
REPLICATE * FROM page_hits WHERE MONTH(time) < MONTH(NOW) - 1 TO <conString>

but in the grand scheme of things, that would be just a little too easy and no where near as satisfying as the huge list of operations, changes and caveats I'm about to get off you good folk ;)

Go ahead, confuse me.


Yet another unchecked rambling brought to you by:
Oddball
 
You could certainly write a simple script to do the job. Or, if you're using a *x system, a single command might be enough, maybe consisting of a "mysqldump" from the local server piped to "mysql" on the remote.
 
I was kind of hoping there was some way for me to store the relevent triggers and procedures on the server - I've already got a script in place that will move the data from one server to another.

I guess in the future I would like the replication to be true replication - ie make the DBMS query both servers like a true cluster.


Yet another unchecked rambling brought to you by:
Oddball
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top