Tuesday, July 16, 2013

MySQL WorkBench problem cannot create user

'Unhandled exception: Error creating account' error message when creating an account in mySQL Workbench.

I'm using workbench 5.2.31 CE.

This problem have popped up, when I'm trying to create a user in mySQL.  

There are two steps to work around this:
  1. edit the sql-mode configuration.  It can be found under Advance tab, Edit the text of sql-mode.  Remove the part "NO_AUTO_CREATE_USER," or cut it.  Then paste it back after you have created your user.
  2. Run the grant all previleges script as instructed below.

The solution is very simple.  You just have to run one of this statement in the Workbench Query window:

GRANT ALL PRIVILEGES ON *.* TO changetousername@localhost;
GRANT ALL PRIVILEGES ON *.* TO 'changetousername'@'%';

This will create an account without password.  So better set the password and change the previleges.

I don't know if this is the best work around or the worst.  But if you are desperate to add a user account.  This is the way that worked for me.

Here is part of the source of the solution:
http://stackoverflow.com/questions/15673640/unhandled-exception-error-creating-account

No comments:

Post a Comment