Is there a way too setup the tool.sql file? Im using 'Latest NCDB Rev 1121'
file called frebsd_tool.SH
Code:
#!/bin/bash
# Academico's tool for NCDB
user="CHANGEME"
pass="CHANGEME"
wdb="WDB"
cdb="CDB"
server="127.0.0.1"
devpath=Development/Database
pubpath=Releases
until [ == x ]
do
clear
echo "####################################"
echo "####### Next Chapter #######"
echo "###### Database ######"
echo "####### Import Tool #######"
echo "####################################"
echo
echo "Please type the letter for the option:"
echo "w = Install NCDB World Database"
echo "c = Install NCDB Clean Character Database"
echo
echo "b - Backup Characters/Acounts Data"
echo "r - Restore Characters/Accounts Data"
echo
echo "d - Debug"
echo "x - Exit"
read -p "Enter option: " letter
if [ ! ]; then
echo
echo "Enter correct option... "
read -p "Press any key to try again..."
echo
else
if [ == w ]; then
echo "[Importing] Started..."
for i in $( ls -C -1 /tables_world/*.sql | cut -d'.' -f1 );
do
if [ != "Development/Database/tables_world/character_tables" ]; then
echo "[Importing]" .sql...
mysql -h --user= --password= < .sql
fi
done
echo "Importing Finished..."
fi
if [ == c ]; then
clear
echo "! ! ! W A R N I N G ! ! !"
echo
echo
echo "This will DELETE all existing Character data"
echo "from the database!"
echo
echo "Are you sure you want to:"
echo "Install clean Character Database?"
echo
echo "'yes' or 'no'"
read -p "Enter option: " resp
if [ != "yes" ]; then
echo "Aborting..."
exit
else
echo "[Importing] Started..."
echo "[Importing] Importing Character/Account tables..."
mysql -h --user= --password= < /character.sql
echo "[Importing] Finished"
echo
fi
fi
if [ == b ]; then
echo "[Backing Up] Started..."
echo "[Backing Up] User Accounts and Characters..."
mysqldump -h --user= --password= accounts auctions characters charters corpses gm_tickets guilds guild_ranks instances ipbans mailbox playeritems playerpets playerpetspells playersummonspells questlog playercooldownitems playercooldownsecurity social tutorials > /Backups/characters_backup.sql
echo "[Backing Up] Finished"
fi
if [ == r ]; then
clear
echo "! ! ! W A R N I N G ! ! !"
echo
echo
echo "This will DELETE all existing Character data"
echo "from the database!"
echo
echo "Are you sure you want to:"
echo "Restore Character Database from a file?"
echo
echo "'yes' or 'no'"
read -p "Enter option: " resp
if [ != "yes" ]; then
echo "Aborting..."
exit
else
echo "[Restoring] Started..."
echo "[Restoring] User Accounts and Characters..."
mysql -h --user= --password= < /Backups/characters_backup.sql
echo "[Restoring] Finished"
echo
fi
fi
if [ == d ]; then
clear
echo "####################################"
echo "###### Next Chapter ######"
echo "##### Database #####"
echo "###### Debug Tool ######"
echo "####################################"
echo
echo "User = "
echo "Password = "
echo "World DB = "
echo "Char DB = "
echo "Server = "
echo "Development Directory Path = "
echo "Releases Directory Path = "
fi
fi
if [ != x ]; then
echo
read -p "press a key to continue..."
echo
fi
echo "Thanks for using NCDB tool!!"
done
if any1 can help me id appreciate it and +Rep you. mysql username=root pass=ascent dbname=ascent host=localhost