My guess is that the 2 servers are running with different settings for NO_AUTO_CREATE_USER sql-mode (refer http://dev.mysql.com/doc/refman/5.6/en/sql-mode.html#sqlmode_no_auto_create_user and http://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sqlmode_no_auto_create_user).

-- Peter
-- Webyog

On Thu, Nov 12, 2015 at 4:56 AM, Felipe Gasper <felipe@felipegasper.com> wrote:
Hello,

        I’ve found an apparent discrepancy between MySQL 5.6 and MariaDB 10.1. When you GRANT ALL PRIVILEGES on a DB to a user/host that is not in the mysql.users table, MariaDB 10.1 throws ER_PASSWORD_NO_MATCH, whereas MySQL 5.6 creates the user/host entry.

        Is this by design? I don’t see the behavior discussed at https://mariadb.com/kb/en/mariadb/grant/.

        Thank you for your time! Below I am including the client outputs for both servers.

-Felipe Gasper
Houston, TX

--------------------------
Server version: 10.1.8-MariaDB-log MariaDB Server

Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> create database fgtemp;
Query OK, 1 row affected (0.00 sec)

MariaDB [(none)]> use fgtemp;
Database changed
MariaDB [fgtemp]> grant all on fgtemp.* to 'root'@'nowhere';
ERROR 1133 (28000): Can't find any matching row in the user table
MariaDB [fgtemp]>
--------------------------
Server version: 5.6.27-log MySQL Community Server (GPL)

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> create database fgtemp;
Query OK, 1 row affected (0.00 sec)

mysql> use fgtemp;
Database changed
mysql> grant all on fgtemp.* to 'root'@'nowhere';
Query OK, 0 rows affected (0.05 sec)
--------------------------

_______________________________________________
Mailing list: https://launchpad.net/~maria-discuss
Post to     : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp