Clancy Wang (@Clancy)记录一次远程数据库连接认证时踩的坑 中发帖

弄了一个MySQL8.0实例,但php总是无法连接(PHP8.3),报错: 
数据库连接失败: SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client [caching_sha2_password]


电脑不在身边,用手机上的termux先凑活一下
pkg安装mysql
mysql -h 登录远程数据库,又报错:
ERROR 2026 (HY000): TLS/SSL error: self-signed certificate in certificate chain

重写打开实例控制面板,找到ca证书,引入:
mariadb -h mysql-2fb7c6ed.xxxxx.com -P 25397 -u root --ssl-ca=/path/to/ca....