Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Database/World Building

Development::Database/World Building World Building forum, dedicated to the EQEmu MySQL Database. Post partial/complete databases for spawns, items, etc.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 01-04-2010, 05:31 PM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

I do my backups/restores via the command prompt.

To backup, use mysqldump. My database in this example is called ykesha rather than peq, so wherever you see ykesha, change it to peq or whatever you called your database:

Code:
C:\Users\Steve>mysqldump -u root -p ykesha > ykesha-backup.sql
Enter password: ******

C:\Users\Steve>
Your entire database is now backed up to the file called ykesha-backup.sql It's a text file, so you can browse through it with notepad.

In the event you wanted to restore that backup, you would go into the mysql command line tool, drop the database and re-create it (empty) and then source in the backup you made earlier, e.g.:

Code:
C:\Users\Steve>mysql -u root -p
Enter password: ******
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.1.31-community MySQL Community Server (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> drop database ykesha;
Query OK, 0 rows affected (0.00 sec)

mysql> create database ykesha;
Query OK, 1 row affected (0.00 sec)

mysql> use ykesha;
Database changed
mysql> source ykesha-backup.sql


<lots of output snipped>
Also, your syntax for changing loregroups is fine. You can omit the `PEQ` prefix if you execute the use peq command first, e.g.:

Code:
C:\Users\Steve>mysql -u root -p
Enter password: ******
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 6
Server version: 5.1.31-community MySQL Community Server (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use peq
Database changed
mysql> update items set loregroup = 0;
Query OK, 33176 rows affected (1.91 sec)
Rows matched: 76214  Changed: 33176  Warnings: 0

mysql>
Reply With Quote
 


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 07:55 PM.


 

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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3