CREATE USER IF NOT EXISTS ...
A new user is created without a problem. An existing user returns that error, but the docs read that CREATE USER
for MySQL > 5.7.6 supports it.
MySQL Version is
Ver 14.14 Distrib 5.7.11, for osx10.9 (x86_64) using EditLine wrapper
Sample
<root:none> CREATE USER IF NOT EXISTS 'foo'@'localhost' IDENTIFIED BY 'bar';
--------------
CREATE USER IF NOT EXISTS 'foo'@'localhost' IDENTIFIED BY 'bar'
--------------
Query OK, 0 rows affected (0.00 sec)
<root:none> CREATE USER IF NOT EXISTS 'foo'@'localhost' IDENTIFIED BY 'bar';
--------------
CREATE USER IF NOT EXISTS 'foo'@'localhost' IDENTIFIED BY 'bar'
--------------
ERROR 1396 (HY000): Operation CREATE USER failed for 'foo'@'localhost'
Suggestions?