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
MySQL supports flow control constructs within stored procedures only.
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)