The error may be due to what MySQL says in the documentation:
If you use the mysql client program to define a program
stored that contains semicolons, a problem arises.
By default, mysql recognizes the semicolon as a
delimiter of instructions, so you must redefine the delimiter
temporarily so that mysql passes all the definition of the program
stored to the server.
To redefine the mysql delimiter, use the DELIMITER
command. The
delimiter is changed to //
to allow the entire definition to be
passed to the server as a single statement and then restored to ;
before invoking the procedure. This activates the delimiter ;
used in the body of the procedure to be passed through the
server instead of being interpreted by the mysql itself.
▸ Source: MySQL Reference Manual, 23.1 Defining Stored
Programs
Example:
delimiter //
create procedure actualizar
(in id int, in nom varchar(45), in corr varchar(45))
begin
update dpersona set nombre=nom, correo=corr where idpersona=id;
end
//
delimiter ;