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

Support::Windows Servers Support forum for Windows EQEMu users.

Reply
 
Thread Tools Display Modes
  #1  
Old 10-22-2009, 08:53 PM
Shin Noir's Avatar
Shin Noir
Legendary Member
 
Join Date: Apr 2002
Location: Seattle, WA
Posts: 506
Default

http://www.pantz.org/software/mysql/mysqlcommands.html

Dump one database for backup.

Code:
# [mysql dir]/bin/mysqldump -u username -ppassword --databases databasename >/tmp/databasename.sql
to put in english, let's say you want to save the sql dump in /home/sylaei/bob.sql and your DB is named bob, and you use the username/pass of sylaei/uber" :
mysqldump -u sylaei -puber --databases bob > /home/sylaei/bob.sql
You may not need the mysqldir/bin/ part assuming your path is properly added.


Restore database (or database table) from backup.

Code:
# [mysql dir]/bin/mysql -u username -ppassword databasename < /tmp/databasename.sql
This works in windows too, though I normally just windows key + r cmd, cd\<dirofsqlfile>, mysql -u username -p <press enter>
type in password, then "use dbname;" then "source <sqlfilenmae>".
Assuming you save it to uhh, c:\bob.sql, here's another example with same sort of syntax, assuming you added sylaei on this account with permissions to make a db etc.:
start up command line.

Before doing this I'd open up your bob.sql in a smart editor to make sure the first line doesn't "create database bob;" I forget if a dump will recreate your db's or not, I don't think it does though!
c:\
cd\
mysql -u sylaei -p
uber
create database bob;
use bob;
source bob.sql

That would take your copy of bob.sql and make it on your new box.
Make sure when you installed MySQL on Windows you had the option of adding a PATH directory, as without it you can't run mysql from any dir.

I don't mess with phpmyadmin and other tools so much, they're nice for optimization and quick overview but for backup/restore the mysql CLI is pretty sexy and simple.

That's all off memory, so yeah. Hope it helps!
__________________

~Shin Noir
DungeonEQ.com
Reply With Quote
Reply

Thread Tools
Display Modes

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 05:26 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