Home > Database > Mysql Tutorial > How to install MySQL8.0 on Mac

How to install MySQL8.0 on Mac

coldplay.xixi
Release: 2020-07-03 17:30:24
forward
3743 people have browsed it

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 log
cat /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 again
    mysql.server start

##success

Related learning recommendations:

mysql Video tutorial

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!

Related labels:
mac
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template