0

I am trying to create a porcedure in mySQL that can create a username and temporary password when called. However I am getting errors with the "not valid in this position, expecting a new parameter name" on the 'user_name' on line 3 and can't figure it out.

delimiter //
drop procedure if exists create_instructor //
create PROCEDURE create_instructor(IN 'user_name' VARCHAR(45), IN 'keyword' VARCHAR(200))
BEGIN
   CREATE USER 'user_name'@'localhost' IDENTIFIED BY 'keyword';
   GRANT ALL PRIVILEGES ON * . * TO `user_name`@'localhost'
end //
delimiter ;

I tried to change parameters and changed the quotes to double quotations but nothing helped. Thanks in advance!

0 Answers0