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 12-28-2017, 05:22 PM
Lane
Sarnak
 
Join Date: Dec 2010
Posts: 62
Default How to use a Database from a SQL dump?

I have PEQ operational but I’m trying to use a SQL database dump from another server to work. I’ve tried to change my config file from using PEQ dB to the new dB but have had no luck.

I’d also be willing to overwrite the PEQ dB with the other dB flies but am not sure how to do this.

I do have both DB listed in HeidiSql however am not sure how to use the other.

Thank you for your help
Reply With Quote
  #2  
Old 12-29-2017, 08:53 PM
phantomghost
Hill Giant
 
Join Date: May 2015
Posts: 126
Default

Go to the SQL file, open it up with notepad ++

There is likely code in there defaulting the update to be on the database the sql came from.
When you save the table or set of tables (at least from heidisql) it notates the database it came from and writes it in the file... so now when you source the file, it comes up with error at row #### already exists etc.

Change it to the new database name.

Quote:
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 10.1.13-MariaDB - mariadb.org binary distribution
-- Server OS: Win32
-- HeidiSQL Version: 9.4.0.5125
-- --------------------------------------------------------

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;


-- Dumping database structure for peq4
CREATE DATABASE IF NOT EXISTS `peq4` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `peq4`;

-- Dumping structure for table peq4.rule_values
CREATE TABLE IF NOT EXISTS `rule_values` (
`ruleset_id` tinyint(3) unsigned NOT NULL DEFAULT '0',
`rule_name` varchar(64) NOT NULL DEFAULT '',
`rule_value` varchar(10) NOT NULL DEFAULT '',
`notes` text,
PRIMARY KEY (`ruleset_id`,`rule_name`),
KEY `ruleset_id` (`ruleset_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- Dumping data for table peq4.rule_values: 509 rows
If you copied your old server folder, pasted it and renamed it .. Original =EQ , new = EQ1 or something.

Then you went in created a 2nd database. Changed the config.xml file to go to the 2nd database, for some reason I could never get this to work except on a fresh computer that has never had a server on it before. (So, when I took a server from 1 computer to a laptop it worked fine, when I tried to make a 2nd server this way, it would never work unless I defaulted the database to the original database... which the 2nd server I wanted to have its own database).

I just took the eq_emuserver.pl file to an empty folder and ran it. Follow the prompts, and it will work. Then just save that SQL file with the new database info at the top and source it in. Should duplicate that server (or whatever you sourced in).


As far as using the other. You can select the database by opening that file.

Is a > symbol next to the Database name.

If it is opened it becomes a v symbol.

That allows you to edit that database.

As far as choosing in CMD prompt.

You just type
use database peq
use database newpeq
or whatever you named your database.

If you export a database as a SQL file, you have to edit the file itself to point it to the database you want it to update. (Otherwise it tries to update the database you exported the SQL from--- the first portion of this post).
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 05:34 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