Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Support > Archive::Windows Servers

Archive::Windows Servers Archive area for Windows Servers's posts that were moved here after an inactivity period of 90 days.

Reply
 
Thread Tools Display Modes
  #1  
Old 06-23-2003, 01:31 PM
Spedfist
Sarnak
 
Join Date: Jun 2003
Posts: 50
Default Mysql/DB question

how would i go about clearing a table so i can source information from a sql formatted text file just for that table, for example: i want to source info from city_defense.txt, but i need to clear the info thats already in the table first so i dont get duplicate errors
Reply With Quote
  #2  
Old 06-23-2003, 01:35 PM
burthold
Sarnak
 
Join Date: Apr 2002
Posts: 46
Default

truncate table <table name>
Reply With Quote
  #3  
Old 06-23-2003, 01:36 PM
Memener's Avatar
Memener
Dragon
 
Join Date: Jan 2003
Location: College park, GA (atlanta)
Posts: 640
Default

if you get duplicate errors it means it is already sourced into your database if you get a mismatch error then you have problems
__________________
AMD AM2 X2 3.01Ghz(OC'ed at 3.8Ghz) 4096MB DDR2 800 Geforce 8800 ultra SLI 1.2TB HD <-- All water cooled

Thanks to Imageshack.us for free image hosting!
Reply With Quote
  #4  
Old 06-23-2003, 01:36 PM
Spedfist
Sarnak
 
Join Date: Jun 2003
Posts: 50
Default re

woot thanks a bunch!
Reply With Quote
  #5  
Old 06-23-2003, 01:42 PM
Spedfist
Sarnak
 
Join Date: Jun 2003
Posts: 50
Default re

i was resourcing with a newer version of the table is what i was doing, so wanted to know just how to drop individual table, but......another question...how do i clear the whole database
Reply With Quote
  #6  
Old 06-23-2003, 01:44 PM
Memener's Avatar
Memener
Dragon
 
Join Date: Jan 2003
Location: College park, GA (atlanta)
Posts: 640
Default

to delete the whole Database open mysql and type drop database eq; then hit enter but if you want to back up the chars or item i dont know those commands
__________________
AMD AM2 X2 3.01Ghz(OC'ed at 3.8Ghz) 4096MB DDR2 800 Geforce 8800 ultra SLI 1.2TB HD <-- All water cooled

Thanks to Imageshack.us for free image hosting!
Reply With Quote
  #7  
Old 06-23-2003, 06:25 PM
Velosity
Sarnak
 
Join Date: May 2003
Location: Rancho Cucamonga, Ca
Posts: 77
Default

if you wish to drop a table just go into mysql and type this

Code:
MySql> use databasename;
Database Changed
MySql> drop table tablename;
Query OK, Yadda Yadda
If you wish to back up your database open up your command prompt (open start menue, go to run, open cmd) or open your MS-DOS prompt

then type this in

[Prompt]
C:\>cd c:\mysql\bin
C:\Mysql\Bin\> mysqldump databasename > filename.sql
[/Prompt]

That will put your database in a sql file

If you want just a specific table from your database dumped so you can do a drop table command type this

[Prompt]
C:\>cd c:\mysql\bin
C:\Mysql\Bin\> mysqldump databasename tablename > filename.sql
[/Prompt]

Hope that helps
Reply With Quote
  #8  
Old 06-24-2003, 12:46 PM
Spedfist
Sarnak
 
Join Date: Jun 2003
Posts: 50
Default re

how would i go about only backing up the character saves that are in the db? and then how to restore those?

thanks for all of the help btw =)
Reply With Quote
  #9  
Old 06-24-2003, 01:20 PM
Lurker_005
Demi-God
 
Join Date: Jan 2002
Location: Tourist town USA
Posts: 1,671
Default

Quote:
Originally Posted by burthold
truncate table &lt;table name>
Ahh I was looking for the command that behaved that way last week :p

Specifically a way to get the autoassigned ID's to start at the beginning again (doors table). I ended dropping the table and recreating it manually :p Much easier! Thanks
__________________
Please read the forum rules and look at reacent messages before posting.
Reply With Quote
  #10  
Old 06-24-2003, 01:38 PM
burthold
Sarnak
 
Join Date: Apr 2002
Posts: 46
Default

the truncate will restart the incramenting key.

Wes
Reply With Quote
Reply


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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 12:35 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3