Description:
MySQL server installs if mysql user exits and logs that it is using both the existing mysql group and user, but it sets wrong folder ownership to the database folder (it uses user and group '88' which is the user and group it would use if no mysql user exists in the system).
Even after correcting those errors, mysql server would fail to start.
Installation goes well if no mysql user and group exists in the system.
root@test:/ # cat /root/.mysql_secret
cat: /root/.mysql_secret: No such file or directory
root@test:/var/db # cat /home/mysql/.mysql_secret
cat: /home/mysql/.mysql_secret: No such file or directory
root@test:/var/db # ls -l
total 40
---------- 1 root wheel 1140 Aug 28 09:26 dhclient.leases.epair0b
drwx------ 2 operator operator 2 Mar 24 22:10 entropy
drwxr-xr-x 3 root wheel 4 Mar 24 22:11 etcupdate
drwx------ 2 root wheel 2 Mar 24 22:10 freebsd-update
drwx------ 2 root wheel 2 Mar 24 22:10 hyperv
drwx------ 2 root wheel 2 Mar 24 22:10 ipf
-rw-r--r-- 1 nobody wheel 0 Mar 24 22:11 locate.database
-rw------- 1 root wheel 28635 Mar 24 22:11 mergemaster.mtree
drwxr-xr-x 2 88 88 2 Aug 28 09:32 mysql
drwxr-x--- 2 root mysql 2 Aug 16 15:04 mysql_secure
drwxr-x--- 2 root mysql 2 Aug 16 15:04 mysql_tmpdir
drwx------ 2 root wheel 2 Mar 24 22:10 ntp
drwxr-xr-x 9 root wheel 10 Aug 27 16:54 pbi
drwxr-xr-x 2 root wheel 5 Aug 28 09:33 pkg
drwxr-xr-x 2 root wheel 2 Mar 24 22:10 ports
drwxr-xr-x 2 root wheel 2 Mar 24 22:10 portsnap
After adding 'mysql_enable="YES"' to /etc/rc.conf, it is impossible to start the server:
service mysql-server start
/usr/local/etc/rc.d/mysql-server: WARNING: failed precmd routine for mysql
Following suggested steps to fix "WARNING: failed precmd routine for mysql" does not fix the issue.
How to repeat:
Create a new Jail in FreeBSD 10.
Add user mysql and assign it to group wheel.
Change to root user.
Install with 'pkg install mysql57-server'
add mysql_enable="YES" to /etc/rc.conf
Try to start mysql-server