login_install.bat 949 B

12345678910111213141516171819202122232425262728
  1. @echo off
  2. REM ############################################
  3. REM ## You can change here your own DB params ##
  4. REM ############################################
  5. REM MYSQL 4.1
  6. set mysqlBinPath=C:\Program Files\MySQL\MySQL Server 4.1\bin
  7. set user=root
  8. set pass=
  9. set DBname=l2jdb
  10. set DBHost=localhost
  11. REM ############################################
  12. set mysqldumpPath="%mysqlBinPath%\mysqldump"
  13. set mysqlPath="%mysqlBinPath%\mysql"
  14. echo.
  15. echo Making a backup of the original database.
  16. %mysqldumpPath% --add-drop-table -h %DBHost% -u %user% --password=%pass% %DBname% > login_backup.sql
  17. echo.
  18. echo Deleting tables for new content.
  19. %mysqlPath% -h %DBHost% -u %user% --password=%pass% -D %DBname% < login_install.sql
  20. echo.
  21. echo Installling new content.
  22. %mysqlPath% -h %DBHost% -u %user% --password=%pass% -D %DBname% < ../sql/accounts.sql
  23. %mysqlPath% -h %DBHost% -u %user% --password=%pass% -D %DBname% < ../sql/gameservers.sql