daily pastebin goal
9%
SHARE
TWEET

Untitled

a guest Jun 8th, 2017 141 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2.  
  3.  
  4. USER=""
  5. PASS=""
  6. SERVER=""
  7. DB=""
  8.  
  9.  
  10. #-- Query delete (account piĆ¹ vecchi di 150 giorni)
  11.  
  12.  
  13. #-- cancella account mai loggati
  14.  
  15. mysql -u $USER -p$PASS -h $SERVER -D $DB -e "delete from realmd.account where datediff(curdate(),date(last_login))>150;"
  16.  
  17. mysql -u $USER -p$PASS -h $SERVER -D $DB -e "delete from realmd.account where datediff(curdate(),date(joindate))>150 AND last_login ='0000-00-00';"
  18.  
  19.  
  20.  
  21. #-- Coerenza reami
  22.  
  23. mysql -u $USER -p$PASS -h $SERVER -D $DB -e "delete from realmd.account_access where id not in (select id from realmd.account);"
  24.  
  25. mysql -u $USER -p$PASS -h $SERVER -D $DB -e "delete from realmd.realmcharacters where acctid not in (select id from realmd.account);"
  26.  
  27.  
  28.  
  29. #-- Coerenza char
  30.  
  31. mysql -u $USER -p$PASS -h $SERVER -D $DB -e "delete from characters where account not in (select id from realmd.account) and account>0;"
  32.  
  33. mysql -u $USER -p$PASS -h $SERVER -D $DB -e "delete from account_data where account not in (select id from realmd.account) and account>0;"
  34.  
  35. mysql -u $USER -p$PASS -h $SERVER -D $DB -e "delete from arena_team where captainguid not in (select guid from characters);"
  36.  
  37. mysql -u $USER -p$PASS -h $SERVER -D $DB -e "delete from arena_team_member where guid not in (select guid from characters);"
  38.  
  39. mysql -u $USER -p$PASS -h $SERVER -D $DB -e "delete from arena_team_member where arenateamid not in (select arenateamid from arena_team);"
  40.  
  41. mysql -u $USER -p$PASS -h $SERVER -D $DB -e "delete from arena_team_stats where arenateamid not in (select arenateamid from arena_team);"
  42.  
  43. mysql -u $USER -p$PASS -h $SERVER -D $DB -e "delete from character_account_data where guid not in (select guid from characters);"
  44.  
  45.  
  46.  
  47. #-- Realm First Level 80  Realm First Raid Achievements Realm First Northen Vanguard + Raid Achievement
  48.  
  49. mysql -u $USER -p$PASS -h $SERVER -D $DB -e "delete from character_achievement WHERE guid not in (select guid from characters) AND achievement NOT BETWEEN '456' AND '467' AND achievement NOT BETWEEN '1400' AND '1427' AND achievement NOT IN(1463, 3117, 3259);"
  50.  
  51. mysql -u $USER -p$PASS -h $SERVER -D $DB -e "delete from character_achievement_progress where guid not in (select guid from characters);"
  52.  
  53. mysql -u $USER -p$PASS -h $SERVER -D $DB -e "delete from character_action where guid not in (select guid from characters);"
  54.  
  55. mysql -u $USER -p$PASS -h $SERVER -D $DB -e "delete from character_aura where guid not in (select guid from characters);"
  56.  
  57. mysql -u $USER -p$PASS -h $SERVER -D $DB -e "delete from character_aura where caster_guid not in (select guid from characters);"
  58.  
  59. mysql -u $USER -p$PASS -h $SERVER -D $DB -e "delete from character_battleground_data where guid not in (select guid from characters);"
  60.  
  61. mysql -u $USER -p$PASS -h $SERVER -D $DB -e "delete from character_declinedname where guid not in (select guid from characters);"
  62.  
  63. mysql -u $USER -p$PASS -h $SERVER -D $DB -e "delete from character_equipmentsets where guid not in (select guid from characters);"
  64.  
  65. mysql -u $USER -p$PASS -h $SERVER -D $DB -e "delete from character_gifts where guid not in (select guid from characters);"
  66.  
  67. mysql -u $USER -p$PASS -h $SERVER -D $DB -e "delete from character_glyphs where guid not in (select guid from characters);"
  68.  
  69. mysql -u $USER -p$PASS -h $SERVER -D $DB -e "delete from character_homebind where guid not in (select guid from characters);"
  70.  
  71. mysql -u $USER -p$PASS -h $SERVER -D $DB -e "delete from character_instance where guid not in (select guid from characters);"
  72.  
  73. mysql -u $USER -p$PASS -h $SERVER -D $DB -e "delete from character_inventory where guid not in (select guid from characters);"
  74.  
  75. mysql -u $USER -p$PASS -h $SERVER -D $DB -e "delete from character_pet where owner not in (select guid from characters);"
  76.  
  77. mysql -u $USER -p$PASS -h $SERVER -D $DB -e "delete from character_pet_declinedname where owner not in (select guid from characters);"
  78.  
  79. mysql -u $USER -p$PASS -h $SERVER -D $DB -e "delete from character_queststatus where guid not in (select guid from characters);"
  80.  
  81. mysql -u $USER -p$PASS -h $SERVER -D $DB -e "delete from character_queststatus_daily where guid not in (select guid from characters);"
  82.  
  83.  
  84.  
  85. #-- mysql -u $USER -p$PASS -h $SERVER -D $DB -e "delete from character_queststatus_weekly where guid not in (select guid from characters);"   <-- non esistente su 3.1.3
  86.  
  87.  
  88.  
  89. mysql -u $USER -p$PASS -h $SERVER -D $DB -e "delete from character_reputation where guid not in (select guid from characters);"
  90.  
  91. mysql -u $USER -p$PASS -h $SERVER -D $DB -e "delete from character_skills where guid not in (select guid from characters);"    
  92.  
  93. mysql -u $USER -p$PASS -h $SERVER -D $DB -e "delete from character_social where guid not in (select guid from characters);"
  94.  
  95. mysql -u $USER -p$PASS -h $SERVER -D $DB -e "delete from character_spell where guid not in (select guid from characters);"
  96.  
  97. mysql -u $USER -p$PASS -h $SERVER -D $DB -e "delete from character_spell_cooldown where guid not in (select guid from characters);"
  98.  
  99.  
  100.  
  101. #-- mysql -u $USER -p$PASS -h $SERVER -D $DB -e "delete from character_stats where guid not in (select guid from characters);"     <-- non esistente su 3.1.3
  102.  
  103.  
  104.  
  105. mysql -u $USER -p$PASS -h $SERVER -D $DB -e "delete from character_talent where guid not in (select guid from characters);"
  106.  
  107. mysql -u $USER -p$PASS -h $SERVER -D $DB -e "delete from character_tutorial where account not in (select id from realmd.account) and account>0;"
  108.  
  109. mysql -u $USER -p$PASS -h $SERVER -D $DB -e "delete from corpse where guid not in (select guid from characters);"
  110.  
  111. mysql -u $USER -p$PASS -h $SERVER -D $DB -e "delete from guild_member where guid not in (select guid from characters);"
  112.  
  113. mysql -u $USER -p$PASS -h $SERVER -D $DB -e "delete from group_instance WHERE leaderGuid not in (select guid from characters);"
  114.  
  115. mysql -u $USER -p$PASS -h $SERVER -D $DB -e "delete from groups WHERE leaderGuid not in (select guid from characters);"
  116.  
  117. mysql -u $USER -p$PASS -h $SERVER -D $DB -e "delete from group_member WHERE leaderGuid not in (select guid from characters) OR memberGuid not in (select guid from characters);"
  118.  
  119. mysql -u $USER -p$PASS -h $SERVER -D $DB -e "delete from gm_tickets WHERE playerGuid not in (select guid from characters);"
  120.  
  121. mysql -u $USER -p$PASS -h $SERVER -D $DB -e "delete from item_instance where owner_guid not in (select guid from characters);"
  122.  
  123.  
  124.  
  125. #-- mysql -u $USER -p$PASS -h $SERVER -D $DB -e "delete from item_refund_instance where player_guid not in (select guid from characters);"     <-- non esistente su 3.1.3
  126.  
  127.  
  128.  
  129. mysql -u $USER -p$PASS -h $SERVER -D $DB -e "delete from mail where sender not in (select guid from characters);"
  130.  
  131. mysql -u $USER -p$PASS -h $SERVER -D $DB -e "delete from mail where receiver not in (select guid from characters);"
  132.  
  133. mysql -u $USER -p$PASS -h $SERVER -D $DB -e "delete from mail_items where mail_id not in (select id from mail);"
  134.  
  135. mysql -u $USER -p$PASS -h $SERVER -D $DB -e "delete from pet_aura where guid not in (select id from character_pet);"
  136.  
  137. mysql -u $USER -p$PASS -h $SERVER -D $DB -e "delete from pet_spell where guid not in (select id from character_pet);"
  138.  
  139. mysql -u $USER -p$PASS -h $SERVER -D $DB -e "delete from pet_spell_cooldown where guid not in (select id from character_pet);"
  140.  
  141. mysql -u $USER -p$PASS -h $SERVER -D $DB -e "delete from petition where ownerguid not in (select guid from characters);"
  142.  
  143. mysql -u $USER -p$PASS -h $SERVER -D $DB -e "delete from petition_sign where ownerguid not in (select guid from characters);"
  144.  
  145. mysql -u $USER -p$PASS -h $SERVER -D $DB -e "delete from petition_sign where playerguid not in (select guid from characters);"
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top