我将MySQL-8.0与MySQL Workbench连接并得到以下错误:
无法加载身份验证插件'caching_sha2_password':dlopen(/usr/local/mysql/lib/plugin/caching_sha2_password.so,2):找不到图像
我也尝试过使用其他客户端工具.
对此有何解决方案?
我是node.js和MySQL初学者,我刚开始设置并尝试一些基本代码.但是,由于某种原因,我甚至无法与服务器建立简单的连接.我使用默认设置安装最新的MySQL Community 8.0数据库和Node.JS.
这是我的node.js代码
var mysql = require('mysql');
var con = mysql.createConnection({
host: "localhost",
user: "root",
password: "password",
insecureAuth : true
});
con.connect(function(err) {
if (err) throw err;
console.log("Connected!");
});
Run Code Online (Sandbox Code Playgroud)
以下是命令提示符中发现的错误:
C:\Users\mysql-test>node app.js
C:\Users\mysql-test\node_modules\mysql\lib\protocol\Parse
r.js:80
throw err; // Rethrow non-MySQL errors
^
Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client
at Handshake.Sequence._packetToError (C:\Users\mysql-
test\node_modules\mysql\lib\protocol\sequences\Sequence.js:52:14)
at Handshake.ErrorPacket (C:\Users\mysql-test\node_mo
dules\mysql\lib\protocol\sequences\Handshake.js:130:18)
at Protocol._parsePacket (C:\Users\mysql-test\node_mo
dules\mysql\lib\protocol\Protocol.js:279:23)
at Parser.write (C:\Users\mysql-test\node_modules\mys
ql\lib\protocol\Parser.js:76:12)
at Protocol.write (C:\Users\mysql-test\node_modules\m
ysql\lib\protocol\Protocol.js:39:16)
at Socket.<anonymous> (C:\Users\mysql-test\node_modul …Run Code Online (Sandbox Code Playgroud) 我只是需要重新安装mysql,我在启动它时遇到了问题.它找不到套接字(mysql.sock).问题是我也不能.在我的Mac OS X 10.4终端中,我输入:locate mysql.sock,然后我回来了/private/tmp/mysql.sock.套接字文件存在于该位置是有道理的,但实际上并非如此.
我怎样才能找到套接字文件?
如果locate返回一个错误的位置,它必须有某种内存,可能还有索引.我该如何刷新该索引?
我刚刚在我的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.
任何帮助表示赞赏.
我知道怎么在ubuntu上跳过这个问题,但我怎么能在MAC OS上做呢?
如何在MAC上设置mysql的密码?
1)不起作用
mysqladmin -u root password NEWPASSWORD
Run Code Online (Sandbox Code Playgroud)
2)不起作用
mysqld --skip-grant-tables --skip-networking &
Run Code Online (Sandbox Code Playgroud)
3)这有效:
我使用 AWS 免费套餐来设置我的 Rails 项目。
但是,我对为什么无法RDS通过 进行连接感到困惑sequel pro。
这是VPC security group正在RDS使用的。
我在 Rails 中设置了相同的主机、用户名、密码和数据库名称database.yml。
我的Rails项目EC2可以完美连接RDS,但无法从sequel pro连接。