In MariaDB on windows I create a user and database with the following
flush privileges;
CREATE USER 'test-one'@'%' IDENTIFIED BY 'test-one';
GRANT USAGE ON *.* TO 'test-one'@'%' REQUIRE NONE WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0;
CREATE DATABASE IF NOT EXISTS `test-one`;
GRANT ALL PRIVILEGES ON `test-one`.* TO 'test-one'@'%';
After that I am unable to connect to the database
.\mysql.exe -u "test-one" -p
Enter password: ********
ERROR 1045 (28000): Access denied for user 'test-one'@'localhost' (using password: YES)
Similar behaviour for
.\mysql.exe -u "test-one" -p -h 127.0.0.1
What does work is (replace with the actual hostname) .\mysql.exe -u "test-one" -p -h
Is this by design? The hostname wildcard '%' does not include localhost nor 127.0.0.1