20,190,720 After two days before the toss environment, reloading the apache and mysql, today debugger is suddenly discovered, mysql the machine get up!
At the launch panel, showed a line of small print
(sorry! Patronize solve the problem, there is no recorded images!)
The directory is not owned by the ‘mysql’ to ‘_mysql’ user
1, due
To brew link php because before been performed
sudo chown -R $ (whoami): admin / usr / local
2, solve
Now think of a way to change back to direct
$ cat /etc/passwd |grep mysql
_mysql:*:74:74:MySQL Server:/var/empty:/usr/bin/false
cat /etc/group |grep mysql
_mysql:*:74:
Users and groups do exist _mysql
(Sorry! Patronize solve the problem, before what is not recorded!)
sudo chown -R _mysql:wheel /usr/local/mysql/data
Now look at the directory belongs to whom?
$ ls -l /usr/local/mysql
lrwxr-xr-x 1 root wheel 30 2 14 2018 /usr/local/mysql -> mysql-5.7.21-macos10.13-x86_64
Try again start mysql, ok it!