From 66541851c2a7814022a65944b3cdc1116e7b2ed0 Mon Sep 17 00:00:00 2001 From: fengmk2 Date: Thu, 10 Oct 2024 20:23:59 +0800 Subject: [PATCH] chore: brew install mysql v9 --- .gitignore | 2 ++ docs/setup.md | 33 +++------------------------------ 2 files changed, 5 insertions(+), 30 deletions(-) diff --git a/.gitignore b/.gitignore index 13fa0f64..8c38b8d5 100644 --- a/.gitignore +++ b/.gitignore @@ -120,3 +120,5 @@ dist .DS_Store run !test/ctx_register.js + +.egg/ diff --git a/docs/setup.md b/docs/setup.md index 55119185..40d21014 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -21,38 +21,11 @@ $ docker-compose down 假设大家使用 macOS 开发,Linux 和 Windows 环境自行参考。 -### MySQL 5.7 +### MySQL 9 ```bash -$ brew install mysql@5.7 -$ brew services start mysql -``` - -### MySQL 8 - -```bash -$ brew install mysql -$ brew services start mysql -``` - -如果遇到以下异常 - -```log -Uncaught Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client -``` - -需要先确认安装的 MySQL 版本,如果是 8.x,在执行时可能会报错不支持此种鉴权方式,需要改一下 MySQL 设置 - -```bash -# 登录数据库 -mysql -u root - -> use mysql; -> update user set plugin='mysql_native_password' where user='root'; -> quit; - -# 重启 MySQL -brew services restart mysql +brew install mysql +brew services start mysql ``` ### Redis