PDA

View Full Version : a small mysql question


DuDeMaN
06-09-2003, 04:06 PM
Is there a command to dump say, all of my items or all of my accounts or characters to a .sql file, or text file some how, so i can source them into another db, so everyone doesn't have to start over, and so i don't have to make 29348234 items again?

thanks :D

Zern
06-09-2003, 07:27 PM
open up the command prompt ...

In this example I'm assuming you installed mysql to the C:\ (personally have it on E: but just follow along, replace C: with whatever drive you installed MySQL on)


use cd C:\mysql\bin

once inside the bin folder in the command prompt, type

"mysqldump [table_name] > [Name of new file which will have the dumped information]"


Also just a note about accounts .... if you don't dump the account table and character_ table ... be sure you match up the account ID's in the character_ table with the new account ID's being created in the new database as if you don't, your users are more than likely not going to have the same AccountID if they have to recreate.


-David

DuDeMaN
06-10-2003, 06:23 PM
woohoo, thanks alot!! :)

Muuss
06-11-2003, 06:04 AM
You may have to add the database name before the table_name statement :

mysqldump database_name table_name > file.sql

ex:

mysqldump eq character_ > mychars.sql

if u want to compile several tables in the same file, replace > by >>, ie :

mysqldump eq items >> mychars.sql

will add the items after the characters...

Muuss