Home >Database >Mysql Tutorial >How to install MySQL8.0 on Mac
1. Install a local mysql on mac
brew mysql install
2. After installing with brew An error occurs when starting mysql.
3. Check the error logcat /usr/local/var/mysql/xxxxx.err
[ERROR] [MY-011011] [Server ] Failed to find valid data directory.
[ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
Find the reason
mysql folder I created it myself.
Delete this folder.
mysqld --initialize-insecure
will create the required folders and files in the mysql data directory
Try to restart mysql againmysql.server start
Related learning recommendations:
The above is the detailed content of How to install MySQL8.0 on Mac. For more information, please follow other related articles on the PHP Chinese website!