I run following commands:
CREATE USER 'dbuser'@'%' IDENTIFIED BY PASSWORD('mypass');
CREATE USER 'dbuserx'@'%' IDENTIFIED BY PASSWORD('mypass');
SET PASSWORD FOR 'dbuser'@'%' = PASSWORD('mypass');
And that results in:
MariaDB [(none)]> select host, user, password,authentication_string from mysql.user;
+------------------+---------+-------------------------------------------+-------------------------------------------+
| host | user | password | authentication_string |
+------------------+---------+-------------------------------------------+-------------------------------------------+
| % | dbuser | | *6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4 |
| % | dbuserx | *6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4 | |
+------------------+---------+-------------------------------------------+-------------------------------------------+
Is this proper? I read there is PAM in MariaDB by default, but why user creation does not store password in authentication_string
right from start?
Could someone explain the difference and possible problems with this?
Mariadb 10.3
Best Answer
All of your
CREATE USER
syntax is 'backwards'. In the "native password" scheme: