MySQL Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesMySQL Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old May 3rd, 2008, 08:44 PM
kefka kefka is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Location: Australia
Posts: 168 kefka User rank is Corporal (100 - 500 Reputation Level)kefka User rank is Corporal (100 - 500 Reputation Level)kefka User rank is Corporal (100 - 500 Reputation Level)kefka User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 1 Day 12 h 17 m 43 sec
Reputation Power: 6
Send a message via MSN to kefka
Replicating/Synchronising Local and Remote Database

Hi guys,

Have a local database (full access) that I need to periodically export to a remote one (very limited cpanel/phpmyadmin access).

I insert, update and delete data in the local one and this all needs to be carried across in the remote one - am not fussed if the actual statements are used, just as long as the end result is the same.

Unfortunately, having very limited access to the remote server means I can't implement replication or any of the other solutions I've seen online/in this forum/on mysql site. For example, I don't have the ability to exit the mysql cnf files, restart the server, specify privileges for users...

The two most likely solutions at this stage seem to be:
  • Empty the remote database, and import all the data from the local one using inserts. Generating the file to import all the data is fairly simple, using HeidiSQL.
  • Copy the database folder itself (from mysql/data) from the local to the remote server.

I don't have access to the mysql/data folder on the remote server, though. So would need to find out from the person who administers my own account if he has access.

So in the end, empty and re-insert (should I just call it "thrust" :P) seems to be the most viable option at this stage. I'd be thrusting about 10000-15000 records across 5 tables each time, though... but I'd only need to do it once a day or once a week.

Does this look like a viable solution, or can anyone suggest a better one?

Thanks

Reply With Quote
  #2  
Old May 4th, 2008, 02:03 AM
pabloj's Avatar
pabloj pabloj is offline
Modding: Oracle MsSQL Firebird
Dev Shed God 5th Plane (7000 - 7499 posts)
 
Join Date: Jun 2001
Location: Outside US
Posts: 7,395 pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 2 Months 2 Weeks 4 h 48 m 59 sec
Reputation Power: 255
Quote:
Originally Posted by kefka
... I'd be thrusting about 10000-15000 records across 5 tables each time, though... but I'd only need to do it once a day or once a week. ...
You might want to take a look at this blog post.

Reply With Quote
  #3  
Old May 4th, 2008, 04:38 AM
kefka kefka is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Location: Australia
Posts: 168 kefka User rank is Corporal (100 - 500 Reputation Level)kefka User rank is Corporal (100 - 500 Reputation Level)kefka User rank is Corporal (100 - 500 Reputation Level)kefka User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 1 Day 12 h 17 m 43 sec
Reputation Power: 6
Send a message via MSN to kefka
deleted post since it seems to have duplicated itself

Last edited by kefka : May 4th, 2008 at 04:41 AM.

Reply With Quote
  #4  
Old May 4th, 2008, 04:39 AM
kefka kefka is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Location: Australia
Posts: 168 kefka User rank is Corporal (100 - 500 Reputation Level)kefka User rank is Corporal (100 - 500 Reputation Level)kefka User rank is Corporal (100 - 500 Reputation Level)kefka User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 1 Day 12 h 17 m 43 sec
Reputation Power: 6
Send a message via MSN to kefka
Quote:
Originally Posted by pabloj
You might want to take a look at this blog post.


Looks handy, thanks for that. Am just curious about the setting up of the federated table - in particular, the bit where I need to set up the connection:

PHP Code:
 CONNECTION='mysql://root:nt300jk@127.0.0.1:3306/remote_test/catalogue';
#Format, according to http://dev.mysql.com/doc/refman/5.0/en/federated-use.html:
# scheme://user_name[:password]@host_name[:port_num]/db_name/tbl_name 


It creates the table, but comes up with an error saying "Incorrect table name" in regards to the connection line...

Also, I take it that the federated tables I create on the local server will need to be the ones used for my local copy of the database? So I would need to recreate an identical but federated-version of the database to get things rolling?

Any ideas? Am testing how well the "thrust" strategy - seems to work fine... most of the time it takes is simply uploading the sql script file to the server. And I'll not be updating it super frequently after the first few weeks...

Thanks again

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMySQL Help > Replicating/Synchronising Local and Remote Database


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway