密码正确但仍显示异常详细信息:System.Data.SqlClient.SqlException:使用 mysql 在 plesk 中登录用户“fundsupg_bse2”失败

问题描述

The password is correct but still shows Exception Details: System.Data.sqlClient.sqlException: Login Failed for user

'fundsupg_bse2' 在 Plesk 中使用 MysqL

**Use:  Asp.net,Web forms 
panel : plesk
configuration : web.config file**
 below is my connection string to connect the MysqL database.

add name="ConnectionString" connectionString="Server=localhost;Database=fundsupg_bse2;User Id=fundsupg_bse2;Password=Wp!8u1p7;" providerName="System.Data.sqlClient"

解决方法

尝试转换字符 '!'在您的配置中使用此密码 -> \u0021 此代码在 HEX/UTF-32 中与您的角色等效。

For Example: "Server=localhost;Database=fundsupg_bse2;User Id=fundsupg_bse2;Password=Wp\u00218u1p7;"