Skip to content

Support for caching_sha2_password #9411

@ian-p-cooke

Description

@ian-p-cooke

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
    If possible, provide a recipe for reproducing the error.

Windows 10
libmysql 8.0.4-3 installed via vcpkg
Visual Studio 2017

// MysqlTest.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <mysql/mysql.h>

int main()
{
	MYSQL mysql;

	mysql_init(&mysql);
	mysql_options(&mysql, MYSQL_SET_CHARSET_NAME, "utf8");
	if (!mysql_real_connect(&mysql, "127.0.0.1", "root", "", "information_schema", 4000, NULL, 0))
	{
		fprintf(stderr, "Failed to connect to database: Error: %s\n",
			mysql_error(&mysql));
		return 1;
	}
	else
	{
		printf("success!\n");
		return 0;
	}
}

build/run an example C client that uses libmysql to connect to database. I actually started out trying to use Rust with Diesel but boiled the problem down to using the C library.

  1. What did you expect to see?

"success!"

especially since DataGrip (JDBC driver) and mysql cli can connect and work fine.

  1. What did you see instead?

"Failed to connect to database: Error: Unknown MySQL error"

TiDB had no errors it its log.

  1. What version of TiDB are you using (tidb-server -V or run select tidb_version(); on TiDB)?

deployed via docker-compose (https://github.com/pingcap/tidb-docker-compose)

Release Version: v3.0.0-beta-27-g6398788
Git Commit Hash: 6398788
Git Branch: master
UTC Build Time: 2019-01-31 08:42:28
GoVersion: go version go1.11.2 linux/amd64
Race Enabled: false
TiKV Min Version: 2.1.0-alpha.1-ff3dd160846b7d1aed9079c389fc188f7f5ea13e
Check Table Before Drop: false

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions