Copying data from 1 database to another

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Copying data from 1 database to another

Post by tford »

Background:
I'm using Navicat to access the MySql database to which AwareIM attaches. So far I've been doing development with one database with regular backups. The data I've been testing with so far can be considered live data. That's true because the system I'm building so far is simply an inquiry system based on data pulled over to the MySql database from an Existing External Postgres DB.

Adding a Test Database: Now I'd like to use the data in the 'crm' database on MySql in the 'crmtest" database. I've never tackled this before. Any tips?
Tom - V8.8 build 3137 - MySql / PostGres
ACDC
Posts: 1138
Joined: Sat Jun 30, 2007 5:03 pm
Location: California, USA

Re: Copying data from 1 database to another

Post by ACDC »

Dump your existing live DB to a .sql file (excl the system tables) and then using a suitable text editor, do a Find and Replace on all references to the Database Name in the .sql file and rename to whatever the new database name is

Create new business space, put it into TEST and then restore the newly edited .sql file. This will overwrite any existing test data in the CRM sample. If you wish to add the CRM test data back you need to run the related import process again
Post Reply