Right, it works for user@localhost.
This is what I see for user@'%' when connecting locally (unix-socket I guess) (only this record exists in mysql.user)
# mysql -u abcdefg
|
Welcome to the MariaDB monitor. Commands end with ; or \g.
|
Your MariaDB connection id is 47
|
Server version: 10.1.13-MariaDB MariaDB Server
|
|
Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.
|
|
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
|
|
MariaDB [(none)]> show grants;
|
+-------------------------------------------------+
|
| Grants for abcdefg@% |
|
+-------------------------------------------------+
|
| GRANT all_all TO 'abcdefg'@'%' |
|
| GRANT USAGE ON *.* TO 'abcdefg'@'%' |
|
| GRANT SELECT ON `mysql`.`user` TO 'abcdefg'@'%' |
|
+-------------------------------------------------+
|
3 rows in set (0.00 sec)
|
|
MariaDB [(none)]> SET ROLE NONE;
|
ERROR 1960 (0L000): The current user is invalid.
|
MariaDB [(none)]> SET ROLE all_all;
|
Query OK, 0 rows affected (0.00 sec)
|
|
MariaDB [(none)]> SET ROLE NONE;
|
ERROR 1960 (0L000): The current user is invalid.
|
MariaDB [(none)]> Bye
|
And when I connect by TCP from outside:
# mysql -h 192.168.56.101 -u abcdefg
|
Welcome to the MariaDB monitor. Commands end with ; or \g.
|
Your MariaDB connection id is 50
|
Server version: 10.1.13-MariaDB MariaDB Server
|
|
Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.
|
|
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
|
|
MariaDB [(none)]> set role none;
|
ERROR 2013 (HY000): Lost connection to MySQL server during query
|
MariaDB [(none)]>
|
Could you please attach your error log and cnf file(s)?
It does not crash for me:
MariaDB [test]> exit
Bye
$ client/mysql -ufoo test
Server version: 10.1.13-MariaDB-debug Source distribution