Windows版の MySQL で、GRANT で新ユーザを作成しようとしたら、
<pre class="prettyprint">mysql> grant all on inquiry.* to ‘ODBC’@’localhost’;
ERROR 1133 (42000): Can’t find any matching row in the user table
</pre>
と言われた。

Windows版では、my.ini の sql_mode に NO_AUTO_CREATE_USER が指定されていて、パスワード無しのユーザを作成できない。そんな時は、NO_AUTO_CREATE_USER をはずすか、パスワード付きでユーザを作ればいい。

<dl>
<dt>NO_AUTO_CREATE_USER をはずす</dt>
<dd>
<pre class="prettyprint">mysql> set sql_mode=””;
Query OK, 0 rows affected (0.00 sec)

mysql> grant all on inquiry.* to ‘ODBC’@’localhost’;
Query OK, 0 rows affected (0.00 sec)
</pre>
</dd>

<dt>パスワード付きでユーザを作成する</dt>
<dd>
<pre class="prettyprint">mysql> grant all on inquiry.* to ‘test2’@’localhost’;
ERROR 1133 (42000): Can’t find any matching row in the user table
mysql> grant all on inquiry.* to ‘test2’@’localhost’ identified by ‘test2’;
Query OK, 0 rows affected (0.00 sec)
</pre>
</dd>
</dl>