PDA

View Full Version : I know this may be a stupid MySQL question but...


kai_shadowbane
09-28-2003, 07:25 AM
How do you add the new database files in while replacing the old records when using the source command?

E.G. using the default source, and then adding in the new db for items, and such

09-28-2003, 07:30 AM
Depends whether the you want to source in a completely new db.

In that case

drop database eq ;

create database eq ;

use eq ;

source <new db>

kai_shadowbane
09-28-2003, 07:33 AM
actually it was more that I want to use the info of the original db, and then add in the new stuff over top of what I already have, since the newer files are more updated, but the newer db may not have all the things in it the old db has

nilremdrol
09-28-2003, 10:36 PM
You need to drop the specific tables and then source in the new db files that will recreate the database files you just dropped. Be carefull to only drop the ones that you'll replace or you'll hose your db. (did that a few times lol) Open your new file in notepad and see what it creates or adds etc to know what to delete.
I usually use the mysql control center just cause i'm not fast with the cli yet, you might want to play with that, it helped me understand what I was doing a bit more. Still learning <grumble grumble>
-Nil
Tendrils of Darkness