DarkWanderer / ClickHouse.Client

.NET client for ClickHouse
MIT License
315 stars 62 forks source link

Password not being accepted by Clickhouse.Client #365

Closed abhishekunotech closed 1 year ago

abhishekunotech commented 1 year ago

I am using a new user created in clickhouse with same permissions as the default user, but with a different password, but i am getting authentication errors -

Host=10.7.41.10;Database=fg_idamuat;User=cymmetri;Password=D****9 Unhandled exception. ClickHouse.Client.ClickHouseServerException (0x00000204): Code: 516. DB::Exception: default: Authentication failed: password is incorrect, or there is no user with such name.

If you have installed ClickHouse and forgot password you can reset it in the configuration file. The password for default user is typically located at /etc/clickhouse-server/users.d/default-password.xml and deleting this file will reset the password. See also /etc/clickhouse-server/users.xml on the server where ClickHouse is installed.

. (AUTHENTICATION_FAILED) (version 23.3.2.37 (official build))

at ClickHouse.Client.ADO.ClickHouseConnection.HandleError(HttpResponseMessage response, String query, Activity activity) at ClickHouse.Client.ADO.ClickHouseConnection.OpenAsync(CancellationToken cancellationToken) at ClickHouse.Client.ADO.ClickHouseConnection.Open() at FileManagementAgent.Database.ClickHouseDBService..ctor(IOptions1 appSettings, ILogger1 logger) at System.RuntimeMethodHandle.InvokeMethod(Object target, Span`1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)

Changing the password of this new user to the same one used by default user allows the application to run as expected.

DarkWanderer commented 1 year ago

Use Username tag, not User