Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    MYSQL




Timing A Trigger Or A Procedure To Execute


I need your help regarding how to time a sql procedure or a trigger to get executed ie., I would like to call the procedure or trigger automatically on a pariticular date and time after satisfying the required conditions.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Execute Trigger
i have created a procedure which generates a trigger on passing the table name to the procedure.

now i want to execute this trigger which is currently stored in a user variable in the stored procedure.

how do i execute the trigger directly from the procedure only or the procedure user variable.

Execute Script From A Trigger
Is possible to launch an external (php) script from a trigger? (If Yes, I'm looking for an example). Or a trigger can only execute a SQL command?

HOW TO TRIGGER A PROCEDURE ONCE ANOTHER PROCEDURE IS FINNISH
I HAVE TO RUN A PROCEDURE AFTER ANOTHER PROCEDURE HAS FINNISH.
HOW CAN I DO IT?.

Unable To Execute Function/procedure
Its work fine for few record say 400 but when we tryed for 800 or more data .its show an error ERROR-1041 .

Granting A User To Execute A Stored Procedure?
I'm a newbie when it comes to MySql (and databases in general).
I'm trying to set up a simple database for an application and now I'm stuck.

I'm trying to grant the user test, execute privilieges on a stored procedure named doStuff stored in the schema test, like:

GRANT EXECUTE ON test.doStuff TO test

I get the following error message:

"Illegal GRANT/REVOKE command; please consult the manual to see which privileges can be used"

What's wrong?
How can I grant a user to execute certain procedures/functions?

Edit: Forgot to mention that I do this from the root user.

Edited 1 time(s). Last edit at 05/08/2006 02:20AM by Daniel Hansen.

How To Use Trigger And Store Procedure In Mysql?
I am using mysql 4.0.20. Based on my knowlegdge, trigger and store procedure feature is not avialable for this version. However, I really need them to fulfill a task, which is to automatically export data to a file when there is new record instert. Is there a way to do it in version 4.0.20? Need your help urgently!

Trigger/stored Procedure Error
I never worked with SP/triggers in MySQL, I have this problem. On
webpage I'd like to show online users, so idea is very simple: in one
select (SP) make all necesary things. I begin with:

CREATE TRIGGER online_insert
AFTER UPDATE ON subs_online
FOR EACH ROW
DELETE FROM subs_online WHERE ts < (unix_timestamp() - 180);
--------------
CREATE PROCEDURE online_insert(ip char(15))
INSERT INTO subs_online
(ip, ts) VALUES (ip, unix_timestamp())
ON DUPLICATE KEY UPDATE ts=unix_timestamp();

IN PHP: $this->db->DbQuery("call
online_insert('{$_SERVER['REMOTE_ADDR']}')");

But I get error:
query: call online_insert('84.47.19.168')
error: Can't update table 'subs_online' in stored function/trigger
because it is already used by statement which invoked this stored
function/trigger.

I tried change "AFTER UPDATE" to something else, but nothing worked as
expected.

MySQL5 Trigger Calling Procedure Syntax
I have an UPDATE trigger on my inventory_transactions table, set to call the spUpdateInventoryCounts procedure for the iInventoryID (FK) record being modified.  Here's the code for my update trigger:

DELIMITER $$

DROP TRIGGER /*!50032 IF EXISTS */ sp_IT_Update$$

create trigger sp_IT_Update AFTER UPDATE on inventory_transactions
for each row BEGIN
    DECLARE tiKey INT;
    SET tiKey = inventory_transactions.iinventoryid;
    CALL spUpdateInventoryCounts(tiKey);
END;
$$

DELIMITER ;

...yet when I modify a row in the Inventory_transactions table, I get an error saying "Error No. 1109
Unknown table 'inventory_transactions' in field list"

...but it's the freakin' table itself!  The error would appear to be in this code, and not the spUpdateInventoryCounts because I dumbed that one down to simply say "update inventory set iqtyinstock=5" just to remove the possibility of that being the culprit.

Big DELETE Timing Out
I'm trying to run the following query to delete categories and sub-categories that have 0 products in them but the query keeps timing out. I have about 20,000 products in about 700 categories. This is just test data but I want to make sure I can process such a large amount of data.

MySQL
DELETE c1.*
FROM categories AS c1
LEFT OUTER JOIN categories AS c2
ON c1.id = c2.parent
LEFT OUTER JOIN products AS p
ON c1.id = p.category
WHERE c2.parent IS NULL
AND p.category IS NULL

I'd like to use LIMIT but you can't use it when you have 2 or more tables.

Is there a way to make this go a lot faster or break the query down into parts so it runs a couple of times?

MySQL Timing Out
When I try to pull out all my data out, the DB appears to be timing out before I get all the data.

There is not a where clause in the select.

Is there a way I can speed up the query? ........

Timing Out Problem?
I've got one database server that works fine when transferring large amounts
of data, but a new one that has been setup seems to want to timeout or drop
the connection after a period of time. I've tried to compare the variables
and they seem to be the same. The versions of MySQL are slightly different
with the good one being 3.23.41 and the one timing out being 3.23.58


Any ideas on what I can check for that would be different or help to keep
this new server from timing out? Seems to want to transfer 3-4000 records
then die. Where the other server will transfer all 60,000+ records.

Connection Timing Out
I have a solaris 10 server and mysql 5.0.37 compiled 64 bit.  I can update the mysql database, create databases, etc, but when I tried to create a simple two-field table, and once again, was hit by the same infamous Error 2013 (Lost connection to Mysql Server).  I noticed this when I tried to optimize a database I had imported, but now I'm finding it a bigger problem. 

MySQL Timing Out
When I look at MySQL in the Windows task manager I see that it isn't using much CPU power, nor is anything else. However, my hard drive light is going non-stop when I try to load a page and whenever the page times out it is always on a line of code fetching a query result from the database.

What could MySQL have suddenly started doing that even simple queries require vast amounts of hard drive usage?

Select Count(*) Timing Out
I'm doing a "select count(*) from table1" and it takes forever, more then 3 minutes, for the result to come back. I'm running MySQL 5.0.19 on RedHat, I know my table has 51M records. When I run a "show table status where name='table1';" it returns the results in a few ms and gives me a record count. My table is defined below, I've tried forcing use of each index individually and forcing no indexes and all combinations and always the same result. Server is an intel based 64bit cpu with 16GB ram with pretty much nothing else going on......

Sql Timing With Transactions - Delete Vs Select
I have a sql command I want to run and time but rollback the results afterwards.
I tried the code below but I don't get any timing output. If I do a select instead of delete I get output.

Any ideas what's going on?

start transaction;
DELETE FROM testtable WHERE col1 = 1;
rollback;
start transaction;
DELETE FROM testtable WHERE col1 = 2;
DELETE FROM testtable WHERE col1 = 3;
rollback;

I don't get any output from the delete but here's the select output:
count(*)
0
count(*)
0
count(*)
19841

MySQL Timing Out? Really Slow Queries, Already Indexed.
For whatever reason, MySQL does not seem to be executing. So, I ran a few stat functions and here is what I got:

Uptime: 220372
Threads: 39
Questions: 18748899
Slow queries: 808
Opens: 28723
Flush tables: 1
Open tables: 4096
Queries per second avg: 85.078

The "open tables" worries me for a few reasons. First, because it is 4kb (exactly, since it is divisible by 1024, evenly). This makes me think that maybe I am hitting a ceiling.

Second, there are a few variables in MySQL that equal this, and maybe it's a cap on something. Here are the variables that equal 4096:
query_cache_min_res_unit = 4096
table_cache = 4096
transaction_prealloc_size = 4096

Do any of those have anything to do with this? Am I even close? Are any of those values from mysql_stat a big deal?

Looping Through Insert Statements Is Timing Out, Alternative?
I am looping through and creating about 600 inserts/executes in PHP and it's timing out.

I have tried aggregating them into one string that ends up like:
INSERT INTO table VALUES(val1, val2,...);INSERT INTO table VALUES(val3, val4,...);INSERT INTO table VALUES(val5, val6,...);...

But is errors out.

I am using PHP5 and MySQL 4.1. How can I get around that? Is there an alternative?

If prepared statement is a way around it, any easy examples to look at?

Can't Edit A Stored Procedure/procedure Already Exists
mySQL server: 5.0.24A
client: Administrator: 1.2.3rc
It's a clean installation with no other versions of mySQL

I have no problems to create and run a stored procedure, but when i edit the stored procedure i get the error "MySQL error number 1304 PROCEDURE xxx already exists"

Anyone know what i am doing wrong?

Execute An SQL Doc
on freehostia.com i have my sql document, is there a way i can execute it, from browser without adding php?

How To Execute An SQL
Open your preferred sql administrator like phpMyAdmin and execute the included SQL file of this pack:

The file name is star_product.sql
I have acces to phpMydmin and currently involved in an Oscommerce website project and wish to add an "Add-on" to it.
I am ok with changing structures to the tables within but have no experience of the above in bold.

Execute Scripts From VB.Net
I want to build a VB.NET update package for an application. So with each new release I want to update the client's database. I work with Stored Procedures, so in order to update the newest sp, I want to run a sql script from VB.NET on the client's pc. It is easy to run normal non-queries, but how do I execute a script?

How To Execute A SQL Script
I have successfully installed MySQL 5 and can also connect to the server. The issue is that my developer has sent me a copy of the database in .sql fromat (filename: abc.sql) and I do not know how to execute it so I can extract the tables. Can someone please show me the way?

GRANT EXECUTE
I'm running MySQL version 5.0.16-nt, and according to the documentation, the EXECUTE is a valid GRANT option that I can give.  Every time that I try however, I get the following:

Error Code : 1144 Illegal GRANT/REVOKE command; please consult the manual to see which privileges can be used What am I doing wrong here?

Execute Sql Script
I want to run a sql script (file) from the "mysql >" prompt and not from the command line. Is there any way to do this.

Execute Source
Is there anybody that knows as to run a query from DOS (I tried with --execute source filename.sql and the error meassege is ERROR1102: incorrect database name filename. When I enter mysql and use directly source filename.sql the query runs).

Execute More Then One Sql Statement
In MSDE I could do this "insert into tbl set fld = 1; insert into tbl set fld = 2". When I try that in MySQl, I get an error (below).

You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '; insert into tbl set fld = 2' at line 1

Does MySQl not support this?

EXECUTE Sp_rename
Hi,

im coverting a mssql 2000 databse to mysql and ive good to a road block, that i cant seem to figure out how to get round.

Part of the MSSQL 2000 code is

Code:

EXECUTE sp_rename



And i cant seem to find an equivelant for mysql, i wa wondering if anybody knows of a way to get around this?

All help is greatly appreciated

Thanks Again

Andy

Log And Execute Connection
1.  How do I log only a certain connection?  I know I can log the current connection using "T filename" option, but I am more interested in logging another connection knowing its ID.  Perhaps I can switch the current connection to the one I want and use the T option? (which leads me to the next question)?
2.  Is it possible to execute a query THROUGH ANOTHER connection using the terminal? Say I log into mysql, it assigns me my own connection, can I, from there, execute a query using one of the other current connections (if its status is "asleep").

Execute A File
Is there a way to execute an SQL script from a file on disk from within MySQL? For example, I have a file containing a valid SQL script at C:david.sql. From within MySQL, I would like to dynamically execute the script contained within that file. Does there exist the syntax to do the equivalent of EXECUTE C:david.sql? I know I can make david.sql a stored procedure … and then CALL david(). I’ve done that. However, frank.sql happens to contain a CREATE FUNCTION statement, and MySQL won’t let you embed a CREATE FUNCTION statement within a stored procedure. If there’s another way to accomplish that end

Cant Execute Batch File
Hi new to this but pulled out nearly all my hair with this.
I got the test database open and I want to automate creating the menagerie table ( as in the tutorial ) so I download the textfile save it to c:/ and execute the command source c:/cr_pets_tbl.txt all I get is unable to open file error 22.
I have tried creating my own text file ( windows, notepad ) just containing the following
use test;
create table pets(name varchar(10),species varchar(8),born date);

simple as that then type in the consoe source c:/pets.txt;
unable to open file error 22 or sometimes error 2
tried enclosing filename in " and ' tried source= filename
tried . instead of source but nothing works.
using manual insert command or load data local infile works but not this, HELP.
Malcolm K.

Execute Time Of A Query
I'm running a SELECT * query on a table with over 3,000 rows. I need to know the execute time on the query.

PHPMyAdmin shows it to me, but because they automatically add a LIMIT 0, 30 I suspect the time is only for those 30 records. It also has a feature to prevent web server timeouts that prevents me from setting the LIMIT to 0, 3100.

BTW, I'm programming in PHP. Does the time to run the query get automatically passed when PHP sends the query to MySQL?

<? PHP
$Query = "select * from my_table where 1";
$Result = MYSQL_QUERY($Query);
?>

Execute Script Blocks
Is there any way that I can get code like this to run directly in the MySQL command line client (or similar tool) without using a wrapper proc/function?

DELIMITER $$
BEGIN
-- Example block of script code that uses an IF statement
IF (1 + 1 = 2) THEN
SELECT 'True' AS Message;
END IF;
END
$$


I often want to execute script blocks directly during development when testing out code.

Incorrect Arguments To Execute
i am using the development release of mysql and have a PROCEDURE that
executes a prepared statement. it works fine when i call the procedure
but repeating it multiple times produces an "incorrect arguments to
execute" error.

replacing the prepared statement with a normal statement eliminates the
error.

is this due to the release or is a prepared statement not allowed in the
procedure?

i read somewhere that procedures are precompiled and hence will it be as
fast as calling it multiple times without using the prepared statement?

Execute A Script In MySQL
I am renting space on 2 servers. On one server I created a script with
sql's "create table .., insert into...". Now I want to execute this
script on the second server. What is a syntax?
I tried from telnet:

dbname < file.sql
where dbname is a name of my db and file.sql is a script, but I got
message "syntax error".

Can't Execute Delete With The IN Operator
Lately I have been started using MySQL. I managed to create my
database and tables.

When I wanted to execute the following query:
delete
from adminpages
where parentid IN ( select DISTINCT A.id from adminpages AS A where
A.name='galeries' );

I have received the following error message:
Error Code : 1064
You have an error in your SQL syntax. Check the manual that
corresponds to your MySQL server version for the right syntax to use
near 'select DISTINCT A.id from adminpages AS A where
A.name='galeries'
(0 ms taken).

DBD::mysql::st Execute Failed
I am trying to store a binary image into a blob field and I am getting the following error:

DBD::mysql::st execute failed: MySQL server has gone away at ...(file and line number here).

I am following several online tutorials on the subject and each one (different implementations) fail at the execute line. If someone could tell me how to fix this I would greatly appreciate it.

I have already tried commenting out the dbh->disconnect; line and it had no effect.

Here is the code that is failing.


use DBI;


our $dbh = DBI->connect('DBI:mysql:pic_test:localhost','whateveruser','whateverpassword', {RaiseError => 1 });


my $sth = $dbh->prepare("INSERT INTO tbl_files (ImageColumn) VALUES (?)");

open(my $fh, 'input.jpg') or die $!;
read( $fh, $var, -s $fh );

$sth->execute($var);


$sth->finish;
$dbh->disconnect;

I am using MySQL server 5.0 on Windows XP and Active PERL 5.8.8.

Execute A Script File
I just update mysql server to version 4.1. And I try to use the following command:

source C:/Program Files/MySQL/
MySQL Server4.1/data/wormlibrary/table_image.txt
to execute a sql script file,
but always get error like can't create table....(errno:150)
This command and script file worked fine when I use version 4.0

Execute Mysqldump Command
I have a file containing the mysqldump command looks like this:

mysqldump -t CPS_Trans Transactions --where:"(TerminalId = 06670002 and .....

I want to know how I can execute that file so that I can output th result to a another text file.

Code Does Not Execute, But No Error Message Given
I used the info from Kevin's Database Driven Website book to construct the following code. It displays without errors. But when I enter info, the info is not entered into the database, and no error message indicates that anything went wrong. When I query the database directly, no data had been entered.
I need another pair of eyes to look at this and tell me where I went wrong.



Average Query Execute Time???
I have a query taking about 4 sec that gets only 18 records.. That's not good. What can I do to speen up my Query?
<CFQUERY DATASOURCE="#datasource#" NAME="qry_job_search">
SELECT DISTINCT (t1.JobPostId), t1.Actionlkp, t1.Date,
tbl_job_posting.*,
tbl_job_post_requirements.*,
tbl_employer_info.*,
tbl_employer_url.*,
tblkp_employment_type.*,
tblkp_education_exp_lvl.*,
tblkp_salary_range.*,
tblkp_employment_exp_lvl.*,
tbl_job_post_location.*,
tbl_job_post_job_categories.JobCat,
tblkp_countries.*,
tblkp_prefectures.*
FROM tbl_job_post_history AS t1
JOIN tbl_job_post_location
ON tbl_job_post_location.JobPostID = t1.JobPostID
JOIN tblkp_countries
ON tbl_job_post_location.CC1 = tblkp_countries.CC1
JOIN tblkp_prefectures
ON tbl_job_post_location.CC1 = tblkp_prefectures.CC1
AND tbl_job_post_location.PrefectureID = tblkp_prefectures.ADM1
LEFT JOIN tbl_job_post_requirements
ON tbl_job_post_requirements.JobPostID = t1.JobPostID
LEFT OUTER JOIN tbl_job_post_job_categories
ON tbl_job_post_job_categories.JobPostID = t1.JobPostID
JOIN tbl_job_posting
ON tbl_job_posting.JobPostID = t1.JobPostID
JOIN tbl_employer_info
ON tbl_employer_info.UserID = tbl_job_posting.UserID
LEFT JOIN tbl_employer_url
ON tbl_employer_url.EmployerID = tbl_employer_info.EmployerID
JOIN tblkp_employment_type
ON tblkp_employment_type.ID = tbl_job_posting.EmploymentType
JOIN tblkp_education_exp_lvl
ON tblkp_education_exp_lvl.ID = tbl_job_posting.EducationExpType
JOIN tblkp_salary_range
ON tblkp_salary_range.ID = tbl_job_posting.Salarylkp
JOIN tblkp_employment_exp_lvl
ON tblkp_employment_exp_lvl.ID = tbl_job_posting.EmploymentExpType
WHERE t1.JobPostId NOT
IN (
SELECT DISTINCT (JobPostId)
FROM tbl_job_post_history
WHERE Actionlkp =4
AND date = (
SELECT MAX( date )
FROM tbl_job_post_history
WHERE JobPostId = t1.JobPostId )
AND JobPostID = t1.JobPostID
)
AND HistID = (
SELECT MAX( HistID )
FROM tbl_job_post_history
WHERE JobPostID = t1.JobPostId
AND Actionlkp =1
)
AND Date >= ( curdate( ) - INTERVAL 30 DAY )

<CFIF SESSION.COUNTRY_A NEQ "" AND SESSION.PREFECTURE_A EQ 0 AND SESSION.CITY_A EQ "">
AND tbl_job_post_location.CC1 = '#SESSION.COUNTRY_A#'
<CFELSEIF (SESSION.COUNTRY_A NEQ "" AND SESSION.PREFECTURE_A NEQ 0 AND SESSION.CITY_A EQ "") OR FORM.PREFECTURE NEQ 0>
AND tbl_job_post_location.CC1 = '#SESSION.COUNTRY_A#'
AND tbl_job_post_location.PrefectureID = '#SESSION.PREFECTURE_A#'
<CFELSEIF SESSION.COUNTRY_A NEQ "" AND SESSION.PREFECTURE_A NEQ 0 AND SESSION.CITY_A NEQ "">
AND tbl_job_post_location.CC1 = '#SESSION.COUNTRY_A#'
AND tbl_job_post_location.PrefectureID = '#SESSION.PREFECTURE_A#'
AND tbl_job_post_location.PostCity LIKE '%#SESSION.CITY_A#%'
</CFIF>
<CFIF (SESSION.CATEGORY_A NEQ 1) OR FORM.CATEGORY NEQ "">
AND tbl_job_post_job_categories.JobCat = '#SESSION.CATEGORY_A#'
</CFIF>
<CFIF (SESSION.KEYWORD NEQ "") OR FORM.KEYWORD NEQ "">
AND t1.Actionlkp = 1
AND (tbl_job_posting.JobTitle
LIKE '%#session.Keyword#%'
OR tbl_job_posting.JobDescription
LIKE '%#session.Keyword#%'
OR tbl_job_post_requirements.JobRequirements
LIKE '%#session.Keyword#%')
<CFIF SESSION.KEYWORD NEQ "" AND SESSION.PGV NEQ "brief">
<CFSET SESSION.PGV = "detailed">
</CFIF>
</CFIF>
<CFIF SESSION.EMP_TYPE_A NEQ 1>
AND tbl_job_posting.EmploymentType = '#SESSION.EMP_TYPE_A#'
</CFIF>
<CFIF SESSION.EXP_LVL_A NEQ 1>
AND tbl_job_posting.EmploymentExpType = '#SESSION.EXP_LVL_A#'
</CFIF>
<CFIF session.SRT EQ "D">
ORDER BY Date DESC
<CFELSEIF session.SRT EQ "C">
ORDER BY tbl_employer_info.CompanyName
<CFELSEIF session.SRT EQ "L">
<CFIF form.country NEQ 0>
<CFIF form.prefecture NEQ 0>
<CFIF form.city NEQ 0>
ORDER BY tbl_job_post_location.PostCity
</CFIF>
<CFELSE>
ORDER BY tblkp_prefectures.FullNameS, tbl_job_post_location.PostCity
</CFIF>
<CFELSE>
ORDER BY tblkp_countries.CC1, tblkp_prefectures.FullNameS, tbl_job_post_location.PostCity
</CFIF>
<CFELSEIF session.SRT EQ "T">
ORDER BY tbl_job_posting.JobTitle
</CFIF>
</CFQUERY>
Can anybody see a shortcut to get the same results??

MySQL Execute An HTTP Request
Can the MySQL engine execute an HTTP request?

Here is he scenario. I have a table that rarely changes but when it does I need to notify a web service. Is it possible to create a trigger that will make an HTTP call when fired and pass a couple of the field values as URL parameters.

Execute A Shell Command Inside SQL
I wonder if there is anyway you can run a shell command inside   SQL.
for example "SELECT * FROM table;execute shell command"
I had googled around and didn't find anything.

Execute Multiple Statements Dynamically
I know how to execute a single statement dynamically without any problem but I was wondering if it is possible to execute multiple statement dynamically.

declare strSql varchar(4000);

set strSql = concat('statement<1>;' ,
'statement<2>'
);

prepare dynSql from @strLine;
execute dynSql;
DEALLOCATE PREPARE dynSql;

How To Execute A Batch Sql File Under Windows?
I have installed MySQL 5 in c:Program FilesMysql. I have a sql file named "books.sql" which is put in the subfolder in,it contains many statements that like "INSERT ... value ...".

my question is how to execute it? I try it, but failed.

One more question is how can I return from "->" to "sql>" promopt?

Dynamically Construct And Execute SQL In StoredProcedure
I need to dynamically create an SQL statement within a MySQL 5.0.20
stored procedure.

-- PSEUDO CODE
create procedure DynSQLTest
(
in sTable varchar(45)
)
begin
declare sSQL varchar(45);

select Concat('select * from ',sTable,' where ...) into sSQL;

EXECUTESQL(sSQL);
end;

Is there a possibility to construct the SQL in a varchar and then
execute it? I spent some time googling but did not find anything.

Can't Execute LOCK TABLES Statement From Mysql++?
When I execute "LOCK TABLES 'ABC_0' WRITE" from control center, it
is successfull, but when I execute this same query from MySql++ client
I get errror exception which says "error near 'ABC_0' WRITE", i don't
know where is problem in query.

My Environment. MySQL ++ (MySQL++ 1.7.1 for VS by
lazyfox),Windows/Linux OS clien/server.

How Can I Execute A PreparedStatement Inside Mysql Function
How can i execute a preparedStatement inside mysql function?

Can A Stored Procedure In Db1 On My Pc CALL Stored Procedure In Db2 On Remote Pc?
i have two database, one is residing on remote pc pc1 and another is residing on another pc pc2, the deal is i want to call a stored procedure in db of pc1, which in turn calls another stored procedure in db of pc2. i knw it sound weird but it solve my problem.

Couldn't Execute '/*!40100 SET @@SQL_MODE='' */': Query Was Empty (1065)
I upgraded to MySQL 5.0, but the remote server still runs 3.23. Before I upgraded I was able to, in a local DOS-prompt, execute a mysqldump and get the database from the server to a file on my computer. Now, when I execute the same query, the remote server does not understand my command.

This is what I execute on my local computer (simplified):
C:foldermysqldump --add-locks --add-drop-table -h xx.xx.xxx.xx -u username -p database > "C:folderdb_downloaded.sql"

This used to work, but after I upgraded I get the error message:
Couldn't execute '/*!40100 SET @@SQL_MODE='' */': Query was empty (1065)


Copyright © 2005-08 www.BigResource.com, All rights reserved