MySQL does not allow you to specify an if not exists clause in a create user statement (despite the fact that create table and c
if not exists
create user
create table
c
Denis answered your precise question, but there are other ways around your problem: see my answer to mysql create user only when the user doesn't exist (where there is also an example of a similar stored procedure as well)