Well i see a lot of people use navicat or sqlyog or whatever to import big DBs... This can take verry long with SQL managers :-/
How to make it faster? using a tool.bat !
Code:
@ECHO off
REM ############################################################################
REM #
REM # B A S I C U S E R C O N F I G U R A T I O N A R E A
REM #
REM ############################################################################
set user=root
set pass=root
REM WorldDB - is the World Database
REM If you do not have them seperated then set them to the same values
set WorldDB=ncdb023
REM ############################################################################
REM #
REM # A D V A N C E D U S E R C O N F I G U R A T I O N A R E A
REM #
REM ############################################################################
set port=3306
set server=localhost
REM ############################################################################
REM #
REM # D O N O T M O D I F Y B E Y O N D T H I S P O I N T
REM #
REM ############################################################################
if %user% == CHANGEME GOTO id10t
if %pass% == CHANGEME GOTO id10t
:menu
cls
ECHO.
ECHO.
ECHO ####################################
ECHO ####### Latruwski #######
ECHO ###### Database ######
ECHO ####### Import Tool #######
ECHO ######## www.mmowned.com ########
ECHO ####################################
ECHO.
ECHO Please type the letter for the option:
ECHO.
ECHO w = Install Full-DB.sql
ECHO.
ECHO Edited by latruwski - Modified from NCDB tool
ECHO.
ECHO.
ECHO x - Exit
ECHO.
set /p l= Enter Letter:
if %l%==* goto error
if %l%==w goto world
if %l%==W goto world
if %l%==u goto update
if %l%==U goto update
if %l%==x goto quit
if %l%==X goto quit
goto error
:world
CLS
ECHO.
ECHO.
ECHO [Importing] World database import Started...
mysql -h %server% --user=%user% --password=%pass% --port=%port% %WorldDB% < Full-DB.sql
ECHO [Importing] Finished
ECHO.
PAUSE
GOTO menu
:update
CLS
ECHO.
ECHO.
ECHO [Importing] World database update Started...
mysql -h %server% --user=%user% --password=%pass% --port=%port% %WorldDB% < Full-Update.sql
ECHO [Importing] Updated Finished!
ECHO.
PAUSE
GOTO menu
:error
CLS
ECHO.
ECHO.
ECHO [ERROR] An error has occured, you will be directed back to the
ECHO [ERROR] main menu.
PAUSE
GOTO menu
:id10t
CLS
ECHO.
ECHO.
ECHO [FAILURE] You did not change the proper directives in this file.
ECHO [FAILURE] Please edit this script and fill in the proper MYSQL Information.
ECHO [FAILURE] When the information is correct: Please Try Again.
PAUSE
GOTO quit
:quit
this is basicly a modified version of NCDB tool...
here is how to use:
Copy this to notepad
You need to change the green part to your Database information:
set user=
set pass=
set WorldDB=
to your DB username, password and WorldDB name
If you run you database on localhost then you are done...
Save this as a .bat file
I zipped the tool.bat for localhost here:
Filebeam - Free Fast File Hosting
and you need to put this file in the same directory as Tool.bat:
Filebeam - Free Fast File Hosting
(unzip it first!)
Here is the downloadlink for the 2 files in 1 link:
Filebeam - Free Fast File Hosting
note: this is a .bat file already, to edit the information inside just right click -> open with notepad
just rename the SQL file with the DB to Full-DB.sql and execute tool.bat
(make sure tool.bat, mysql.exe AND the Full-DB.sql are in the same folder )
When the database is not hosted locally you need to change the red part also:
set port=3306
set server=localhost
to the DB host information
same thing to do here... rename the DB SQL file or Update SQL file to Full-DB.sql and execute tool.bat
Why using tool.bat?
You will notice with a bat file importing a DB goes WAY faster then using a SQL manager!
Also it is easy to use!
Important notes!
-> Change the filename of the SQL file you wish to execute to "Full-DB.sql"
-> You can also use this tool to import updates or other sql files
-> All 3 files have to be in the same folder (tool.bat, mysql.exe and Full-DB.sql)
Well i hope this helped to some people
grtz