patternsqlMinor
MARIADB default users
Viewed 0 times
defaultusersmariadb
Problem
I just installed mariadb 10.6 and can't understand...
SHOW CREATE USER 'mariadb.sys'@localhost\G;
SHOW CREATE USER 'root'@localhost\G;
SHOW CREATE USER 'mysql'@localhost\G;
Thank you!
Versions:
SELECT Host,User,Password FROM mysql.user;mariadb.sys@localhostpassword is empty.
root@localhostpassword hashed.
mysql@localhostpassword has "invalid" value in cell.
SHOW CREATE USER 'mariadb.sys'@localhost\G;
CREATE USER `mariadb.sys`@`localhost` ACCOUNT LOCK PASSWORD EXPIRESHOW CREATE USER 'root'@localhost\G;
CREATE USER `root`@`localhost` IDENTIFIED
VIA mysql_native_password USING '***' OR unix_socketSHOW CREATE USER 'mysql'@localhost\G;
CREATE USER `mysql`@`localhost` IDENTIFIED
VIA mysql_native_password USING 'invalid' OR unix_socket- What for default users are?
root@localhost = for me, mariadb.sys@localhost = for mariadb.sys system, mysql@localhost = for mysql user and for linux system.- I used
mysql_secure_installationcommand. Do i really need do anything else? Is everything OK with secure?
- Can I delete
mariadb.sys@localhostormysql@localhostusers?
- Why do I need to setup password for
mysql@localhostuser?
- "invalid" in password cell means not password, but mariadb "secure feature"?
ACCOUNT LOCK PASSWORD EXPIREwhat is this?
- As far as I understand I can't and I don't need to setup password for
mariadb.sys@localhost?
Thank you!
Versions:
- Kernel: linux510 (Linux 5.10.56-1)
- Distro: Manjaro 21.1.0 (Arch Linux)
- MariaDB Version: MariaDB 10.6.4
Solution
-
root@localhost- you, but its also helpful if this is there, unmodified (setting a password is ok - as you have done, but keep theOR unix_socketpart for package updates
mariadb.sys@localhostthis is the owner of themysql.userscompatibility view, which is why its account is locked/password expired.
mysql@localhost- I suspect this is some packaging decision to create this. It might be tied to logrotate or some monitoring system.
mysql_secure_installation- I can't tell if this changed anything from the default installation. Nothing else is needed.
- No, don't delete these users. Understand why
mysql@localhostexists, however its not usable by anything else, something needs to switch to themysqlunix user to be used.
- you don't need to set a password for
mysql@localhost.
invalidis a place holder of a hash that doesn't have a real password that maps to it. Its there so if a user desires, they can set a password on the account.
- ACCOUNT LOCK is a locked account. PASSWORD EXPIRE is an expired password.
- Changing
mariadb.sys@localhostisn't needed. It is recommended you don't change this.
Context
StackExchange Database Administrators Q#298364, answer score: 5
Revisions (0)
No revisions yet.