diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-12-01 00:38:00 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-12-01 00:38:00 +0300 |
commit | 8c023395258e35e78464155de47c03341630d288 (patch) | |
tree | 9ff93ed68a5afccaf002237450124eb4a6c6e1dc /localserver | |
parent | b5042022ac2b5f0183e2c53ad9bdebfa409eb212 (diff) | |
download | evol-tools-8c023395258e35e78464155de47c03341630d288.tar.gz evol-tools-8c023395258e35e78464155de47c03341630d288.tar.bz2 evol-tools-8c023395258e35e78464155de47c03341630d288.tar.xz evol-tools-8c023395258e35e78464155de47c03341630d288.zip |
add tools for managing local server.
Diffstat (limited to 'localserver')
-rwxr-xr-x | localserver/givegm.sh | 8 | ||||
-rwxr-xr-x | localserver/initdb.sh | 18 |
2 files changed, 26 insertions, 0 deletions
diff --git a/localserver/givegm.sh b/localserver/givegm.sh new file mode 100755 index 0000000..c1a9c28 --- /dev/null +++ b/localserver/givegm.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +ID="$1" +if [[ -z "${ID}" ]]; then + mysql -u evol -pevol evol -e "update login set group_id=99 where account_id=2000000;" +else + mysql -u evol -pevol evol -e "update login set group_id=99 where account_id=${ID} or userid='${ID}';" +fi diff --git a/localserver/initdb.sh b/localserver/initdb.sh new file mode 100755 index 0000000..82f9257 --- /dev/null +++ b/localserver/initdb.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +cd ../../server-data/sql-files + +echo Creating db and user... +echo Enter mysql root password: +mysql --force -u root -p <./init.sql + +export CMD="mysql -u evol -pevol evol" + +echo Creating tables... +$CMD <main.sql +$CMD <mob_skill_db.sql +$CMD <mob_skill_db2.sql +$CMD <logs.sql +$CMD <item_db_re.sql +$CMD <mob_db_re.sql +$CMD <mob_skill_db_re.sql |