Mysql – user permissions in MariaDB

mariadbMySQLpermissions

I have a MariaDB 10.1 instance (Debian GNU/Linux 9 testing/unstable). It is meant to be a local network database server and nothing else. For resons beyond the scope of this question, that server must not host anything else except the database itself, which must listen on the server IP address (10.7.33.102).

If I connect to the database from the server shell, all is ok:

root@datangshan:~# mysql
[...]
MariaDB [(none)]> show databases;

+--------------------+
| Database           |
+--------------------+
| drackmd            |
| information_schema |
| mysql              |
| performance_schema |
| test               |
+--------------------+
5 rows in set (0.00 sec)

The drackmd is the database other hosts need to use.
I've tried enabling root user to connect from another host with the following command:

grant all privileges on `*`.`*` to 'root'@'10.7.33.107' identified by 'secret' with grant option;

Then, from the server at 10.7.33.107, I can connect to the DB server, but the root user seems to lack some kind of permission:

root@10.7.33.107:~# mysql -h 10.7.33.102 -p
Enter password: 
[...]
MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
+--------------------+
1 row in set (0.00 sec)

What command should I issue to the DB server to make root (or other users) see all databases and all tables in them?

Best Answer

Solution I got in the #maria channel on IRC:

drop user 'root'@'10.7.33.107';
drop user 'root'@'%';
flush privileges;
grant all on `*`.`*` to 'root'@'10.7.33.107' identified by 'secret' with grant option;

Please note the difference: it's a grant all on ... instead of a grant all PRIVILEGES on....