32 lines
1.4 KiB
Batchfile
32 lines
1.4 KiB
Batchfile
::: mysql导出工具文件全名
|
|
set ExportBinary="%~dp0mysqldump.exe"
|
|
::: mysql导入工具文件全名
|
|
set ImportBinary="%~dp0mysql.exe"
|
|
|
|
::: 要导出的服务器设置
|
|
set ExportHostname="rr-bp1x2415jy37d8mu1o.mysql.rds.aliyuncs.com"
|
|
set ExportHostport="3306"
|
|
set ExportUsername="games"
|
|
set ExportPassword="Games2017@)!&"
|
|
set ExportDatabase="game_db"
|
|
|
|
::: 要导入的服务器设置
|
|
set ImportHostname="rm-wz978o3vha6z26m5no.mysql.rds.aliyuncs.com"
|
|
set ImportHostport="3306"
|
|
set ImportUsername="yunuser"
|
|
set ImportPassword="Yun_User"
|
|
set ImportDatabase="game_db"
|
|
|
|
set TempHostname="localhost"
|
|
set TempHostport="3309"
|
|
set TempUsername="root"
|
|
set TempPassword="root_root"
|
|
set TempDatabase="game_db"
|
|
|
|
set ScriptnamePrefix=%~dp0script\%date:~0,4%%date:~5,2%%date:~8,2%
|
|
|
|
%ExportBinary% --default-character-set=utf8 --opt -h%ExportHostname% -P%ExportHostport% -u%ExportUsername% -p%ExportPassword% %ExportDatabase% player_grade > "%ScriptnamePrefix%_player_grade.sql"
|
|
pause
|
|
%ImportBinary% --default-character-set=utf8 -h%TempHostname% -P%TempHostport% -u%TempUsername% -p%TempPassword% %TempDatabase% < "%ScriptnamePrefix%_player_grade.sql"
|
|
::update player a, player_1 b set a.play_nickname = b.play_nickname, a.play_avatar = b.play_avatar, a.play_roomcard = b.play_roomcard, a.play_bean = b.play_bean where a.play_agentid = b.play_agentid and a.play_channelid = b.play_channelid and a.play_playerid = b.play_playerid
|
|
pause |