help how to run mysql script

11/21/2010 23:22 DuaSelipar#1
can somebody help me how to run a mysql script
Quote:
delete from cq_action where id >= 3021320 and id <= 3021327;
delete from cq_action where id >= 9667630 and id <= 9667631;
delete from cq_itemtype where id >= 810013 and id <= 810013;
INSERT INTO `cq_itemtype` VALUES ('810013', '5xExpPotion', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1588000000', '9667630', '0', '0', '0', '0', '0', '0', '0', '1', '1', '0', '0', '0', '0', '0', '0', '0', '0', '01', '800', '00', '0000', '0000', '0', '0', '1588', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO `cq_action` VALUES ('3021320', '3021321', '0000', '4001', '0', '43 500 3600 0');
INSERT INTO `cq_action` VALUES ('3021321', '3021322', '0000', '0502', '810013', '0');
INSERT INTO `cq_action` VALUES ('3021322', '3021323', '3021325', '1102', '0', 'count < 1');
INSERT INTO `cq_action` VALUES ('3021323', '3021324', '0000', '1010', '2000', '%user_name~has~used~5x~Exp~Potion~for~the~team!') ;
INSERT INTO `cq_action` VALUES ('3021324', '0000', '0000', '0126', '0', '%user_name~has~used~5x~Exp~Potion~and~obtained~1~ hour~of~5x~Exp!');
INSERT INTO `cq_action` VALUES ('3021325', '3021326', '0000', '1010', '2003', '%user_name~has~used~5x~Exp~Potion~and~obtained~1~ hour~of~5x~Exp!');
INSERT INTO `cq_action` VALUES ('3021326', '3021327', '0000', '1010', '2000', '%user_name~has~used~5x~Exp~Potion~and~obtained~1~ hour~of~5x~Exp!');
INSERT INTO `cq_action` VALUES ('3021327', '0000', '0000', '0126', '0', '%user_name~has~used~5x~Exp~Potion~and~obtained~1~ hour~of~5x~Exp!');
INSERT INTO `cq_action` VALUES ('9667630', '9667631', '3021320', '1009', '0', '158 second > 0');
INSERT INTO `cq_action` VALUES ('9667631', '0000', '0000', '0126', '0', '¸óÏÂÕýÔÚ»ñµÃ¾*Ñé¼Ó³É£¬ÎÞ·¨ÔÙʹÓÃË«±¶¾*ÑéÒ©Ë®ÁË¡£' );
i open cq_action and open query table put that file like below..after i run nothing happen..what i gonna do next?....... i still learing about db
11/22/2010 00:11 karnyge#2
open the query tab and copy the script into it, hit run and then wait for it to tell you if there is errors
if errors, find them and change the script
run again, when no errors you are done.
11/22/2010 01:42 .Ash#3
Steps:
1)Open Navicat
2)Open connection where your my database is
3)Open "my" Database
4)Press "Query"
5)New Query
6)Copy and paste the code.
7)IF you have a file, Do Steps 1 to 3
8)Right click on my database
9)Execute SQL File..


Hope this helps..
11/22/2010 08:11 DuaSelipar#4
after i run it say: Affected rows: 1 Time: 0.000ms and i close it before close it it say save.. im gonna save it or no?..that script mean work when it say affected rows: 1 ?
11/22/2010 09:38 PraDevil[ELITE]#5
if it says affected rows thats mean your are done running it without no problem :)
11/22/2010 10:43 DuaSelipar#6
ermm..sory but asking..how to maint a server?
11/22/2010 12:02 .Ash#7
Quote:
Originally Posted by dariuslies View Post
ermm..sory but asking..how to maint a server?
How to make a maintenance in the server? well.. close all the things you running is an easy way to put it.

Was that the question or something else?....
11/24/2010 05:21 DuaSelipar#8
should i maint after run script?
11/24/2010 11:58 .Ash#9
Alright, If you run queries in cq_action, you don't have to do maints. If you do queries on something else, you have to. If you do cq_action queries, in game do this code

/reloadaction Action#

Replace Action# with the IDs you just ran. Or, do

/reloadaction 0


It will Refresh the whole cq_action, Caution.. It will make you lag for a second or two.

Ex:
Code:
/reloadaction 3021320
/reloadaction 3021321
/reloadaction 3021322
/reloadaction 3021323
/reloadaction 3021324
/reloadaction 3021325
/reloadaction 3021326
/reloadaction 3021324
/reloadaction 9667630
/reloadaction 9667631
These are for your script