Source after installing MySQL, the first time to start, often encounter can not update the PID file problems.
There are several reasons for this:
1. The service was not closed before. (if MySQL has been installed before, source installation directly uninstall MySQL, but did not shut down the service)
2. Initialization of data failed.
3. Data Catalog error.
4. Data Directory Permissions issues
Workaround: Check if 3306 port is occupied, if it is occupied, kill the process, release 3306 port, because the socket interface file can not be reused, and then restart MySQL.
See if the directory where the data is stored is correct.
View permissions for the data directory.
You can also view the data directory under the error log hostname.err, which generally logs the wrong information.
If there is no error log, the data directory specifies an error.
The specific problem also has to see the cause of the error, the above is for reference only.
This article is from the "Wang Supeng blog" blog, make sure to keep this source http://wangcf1009.blog.51cto.com/8589325/1568294
MySQL cannot update PID file