我刚刚在我的macOS v10.13.4上安装了MySQL Ver 14.14 Distrib 5.7.22和Homebrew.
我跑了命令:
brew install mysql
安装完成后,按照Homebrew的指示,我运行了命令:
mysql_secure_installation
并返回错误:Error: Authentication plugin 'caching_sha2_password' cannot be loaded: dlopen(/usr/local/Cellar/mysql/5.7.22/lib/plugin/caching_sha2_password.so, 2): image not found
我尝试了一些事情,比如在my.cnf文件中将default_authentication_plugin更改为mysql_native_password,但它仍然会抛出相同的错误.
接下来我试着跑:
mysql_upgrade -u root
我再次抛出同样的错误mysql_upgrade: Got error: 2059: Authentication plugin 'caching_sha2_password' cannot be loaded: dlopen(/usr/local/Cellar/mysql/5.7.22/lib/plugin/caching_sha2_password.so, 2): image not found while connecting to the MySQL server
Upgrade process encountered error and will not continue.
任何帮助表示赞赏.
还有一个问题是打开的,同一个标题已被关闭但我的错误无法使用该问题中给出的解决方案解决.
我使用以下方法成功安装了Browser-Sync:
bash
$ sudo npm install -g browser-sync
但是当我通过输入以下内容检查浏览器同步版本时:
bash
$ browser-sync --version
我收到此错误:
bash
-bash: browser-sync: command not found
我刚刚通过从 MySQL 网站下载的 dmg 包在 macOS High Sierra v10.13.4 上安装了 MySQL v8.0.11。安装程序在安装过程中不要求任何权限或访问设置。安装完成后,我尝试运行:
$ mysql -u root
返回错误ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)。然后我尝试运行相同的命令,sudo但返回了相同的错误。
浏览类似问题的答案,我尝试运行:
sudo /etc/init.d/mysql stop
它返回错误sudo: /etc/init.d/mysql: command not found
如果那么我继续尝试下一步,即
sudo mysqld_safe --skip-grant-tables
我返回输出
[2] 27806
[2] + 27806 suspended (tty output) sudo mysqld_safe --skip-grant-tables
另外,运行
mysqld --skip-grant-tables
会返回以下错误:
mysqld: Can't change dir to '/usr/local/mysql-8.0.11-macos10.13-x86_64/data/' (OS errno 13 - Permission denied)
2018-04-20T14:29:23.579709Z 0 [System] [MY-010116] [Server] /usr/local/mysql-8.0.11-macos10.13-x86_64/bin/mysqld (mysqld …