With MARIADB also have a period of time, commonly used commands and grammar, basically unchanged. More complex, such as replication, did not find any difference in root MySQL.
However, today really found that there are different places, mariadb rights Management root MySQL is not the same, MySQL can create a root account equivalent permissions of the account, but mariadb is not, writing on the different.
1,MARIADB Grant Authorized an error
MARIADB [(None)]> grant all privileges in *.* to tank@ ' 192.168.% ' identified by ' test ';
ERROR 1045 (28000): Access denied for user ' root ' @ ' localhost ' (using Password:no)
The same command under MySQL, execution is without any problems.
At first thought is mariadb root account and password has the problem, check after no problem.
2,mariadb and MySQL root permissions are different
look at the permissions that the root account has, mariadb and MySQL are different.
MARIADB [(None)]> show Grants\g;
1. Row ***************************
grants for Root@localhost:grant SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD , SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, show DATABASES, SUPER, CREATE temporary tables, LOCK tables, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, create VIEW, show view, create routine, ALTER routine, create USER, EVENT, TRIGGER On *.* to ' root ' @ ' localhost ' with GRANT OPTION
1 row in Set (0.00 sec)
Error:no query specified
+---------------------------------------------------------------------+
| Grants for Root@localhost |
+---------------------------------------------------------------------+
| Grant all privileges in *.* to ' root ' @ ' localhost ' with GRANT OPTION |
+---------------------------------------------------------------------+
1 row in Set (0.00 sec)
3,MARIADB is different from MySQL grant syntax
for specific purposes, please refer to: https://mariadb.com/kb/en/mariadb/grant/
MARIADB [(None)]> grant all on test.* to tank@ ' 192.168.% ' identified by ' test ';
Query OK, 0 rows Affected (0.00 sec)
MARIADB [(None)]> Grant Select on *.* to tank@ ' 192.168.% ' identified by ' test ';
Query OK, 0 rows Affected (0.00 sec)
The first command gives tank all the permissions on the test library.
The second command gives the SELECT permission for all libraries and tables to the tank
Note: All can not be used with *.*, or it will be an error.