gpt4 book ai didi

mysql - 带有特殊字符的密码导致 "toad for mysql"错误

转载 作者:行者123 更新时间:2023-11-29 00:12:32 25 4
gpt4 key购买 nike

我的 MySQL 帐户有一个密码,其中包含特殊字符 "。如果我尝试使用 Toad for MySQL 连接到 MySQL 服务器,它会导致以下错误(我只在德语):

System.ArgumentException Das Format der Initialisierungszeichenfolge stimmt nicht mit der Spezifikation überein, die bei Index '19' beginnt. Stack Trace: bei System.Data.Common.DbConnectionOptions.GetKeyValuePair(String connectionString, Int32 currentPosition, StringBuilder buffer, Boolean useOdbcRules, String& keyname, String& keyvalue) bei System.Data.Common.DbConnectionOptions.ParseInternal(Hashtable parsetable, String connectionString, Boolean buildChain, Hashtable synonyms, Boolean firstKey) bei System.Data.Common.DbConnectionOptions..ctor(String connectionString, Hashtable synonyms, Boolean useOdbcRules) bei System.Data.Common.DbConnectionStringBuilder.set_ConnectionString(String value) bei MySql.Data.MySqlClient.MySqlConnectionStringBuilder..ctor(String connStr) bei MySql.Data.MySqlClient.MySqlConnection.set_ConnectionString(String value) bei MySql.Data.MySqlClient.MySqlConnection..ctor(String connectionString) bei Quest.Toad.MySQL.MySQLConnection.CreateConnection() bei Quest.Toad.MySQL.MySQLConnection.DoBeforeConnect() bei Quest.Toad.Db.Connection.Connect(Boolean notify) bei Quest.Toad.Db.Provider.BackgroundConnector.CreateBackgroundConnection()

如何在不更改密码的情况下避免此错误?(在另一个不在密码中使用特殊字符的帐户上)

更新:我也尝试使用 \" 对其进行转义 - 但它会导致相同的错误。

更新 2:我还尝试用单引号写密码,例如 'Pass"word' - 也会导致同样的错误。

更新 3:"Pass\"word" 导致相同的错误。

最佳答案

在密码周围使用 ' 单引号。因此,如果密码(例如)jell"y 像这样使用它

mysql -u root -p'jell"y'

从未使用过 Toad,但来自 Toad's support page它说要使用

SET ESCAPE ON

然后使用 \

转义特殊字符

不确定,但它可能会有所帮助。所以想到发帖。

关于mysql - 带有特殊字符的密码导致 "toad for mysql"错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24367604/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com