I logged to MariaDb:
mysql -u root
Then I issued following commands:
USE mysql;
CREATE USER 'xxx'@'192.168.1.%' IDENTIFIED BY 'xyz';
GRANT ALL PRIVILEGES ON *.* TO 'xxx'@'192.168.1.%' WITH GRANT OPTION;
The last command triggered an error:
MariaDB [mysql]> GRANT ALL PRIVILEGES ON *.* TO 'xxx'@'192.168.1.%' WITH GRANT OPTION;
ERROR 1133 (28000): Can't find any matching row in the user table
However, when I tried the same thing using the HeidiSQL:
USE mysql;
CREATE USER 'xxx'@'192.168.1.%' IDENTIFIED BY 'xyz';
GRANT ALL PRIVILEGES ON *.* TO 'xxx'@'192.168.1.%' WITH GRANT OPTION;
FLUSH PRIVILEGES;
the user was created without any errors.
So, I was able to create the user, but I would still like to understand why it did not work from the command line.