Let's take a look at a solution to MARIADB Grant ERROR 1045 (28000): Access denied for user issues, hopefully the article will help you friends.
With MARIADB also has a period of time, commonly used command and grammar, basically unchanged. More complicated, such as replication, and there is no difference between the root MySQL found.
However, today really found that there are different places, mariadb rights Management root MySQL is not the same, MySQL can create a root account with the same privileges of the account, but mariadb is not, the wording is also different.
1,MARIADB Grant Authorization Error
MariaDB [(None)]> grant all privileges on * * to [e-mail protected] ' 192.168.% ' identified by ' test ';
ERROR 1045 (28000): Access denied for user ' root ' @ ' localhost ' (using Password:no)
The same command under MySQL, execution is no problem.
At first thought is mariadb root account and password has a problem, after checking no problem.
2,mariadb differs from MySQL root permissions
looking at the permissions that the root account has, mariadb and MySQL are not the same.
MariaDB [(None)]> show Grants\g;
*************************** 1. Row ***************************
Grants for [email protected]: GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REF Erences, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE temporary TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, Replicatio N 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
mysql> Show grants;
+---------------------------------------------------------------------+
| Grants for [email protected] |
+---------------------------------------------------------------------+
| GRANT all privileges on * * to ' root ' @ ' localhost ' with GRANT OPTION |
+---------------------------------------------------------------------+
1 row in Set (0.00 sec)
3,MARIADB differs from MySQL grant syntax
specific to the FA, please refer to: https://mariadb.com/kb/en/mariadb /grant/
mariadb [(None)]> grant all on test.* to [email protected] ' 192.168.% ' identified by ' test ';
query OK, 0 rows Affected (0.00 sec)
  
mariadb [(None)]> Grant select on * to [email protected] ' 192.168.% ' identified by ' test ';
query OK, 0 rows Affected (0.00 sec)
The first command, give all permissions to the test library to tank
The second command, give the SELECT permission for all libraries and tables to tank
Note: All cannot be used with *. *, otherwise it will be an error.
Fix MARIADB Grant ERROR 1045 (28000): Access denied for user