Bug 251210 - databases/mariadb105-server "chown: mysql: illegal user name"
Summary: databases/mariadb105-server "chown: mysql: illegal user name"
Status: Closed Not A Bug
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Bernard Spil
Depends on:
Reported: 2020-11-17 08:48 UTC by David Armstrong
Modified: 2020-11-18 00:55 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (brnrd)


Note You need to log in before you can comment on or make changes to this bug.
Description David Armstrong 2020-11-17 08:48:22 UTC
After make install clean && rehash for databases/mariadb105-server (10.5.8) and databases/mariadb105-client, I ran:

sysrc mysql_enable="YES" (no issues)

service mysql-server start

Which produced:
chown: mysql: illegal user name
Cannot change ownership of the database directories to the 'mysql' user.  Check that you have the necessary permissions and try again.
/user/local/etc/rc.d/mysql-server: WARNING: failed precmd routine for mysql
Comment 1 VVD 2020-11-17 16:22:03 UTC
id mysql
Comment 2 David Armstrong 2020-11-18 00:54:59 UTC
There was a mismatch in user accounts somewhere.  It was a fresh install of FreeBSD 12.2, upgraded from 12.1.  I may be mistaken but perhaps that upgrade process tripped up the user accounts.

In the end to resolve this issue, I ran:

Then removed the last line, which was a "mysql" user.
I also trashed the contents of /var/db/mysql.