从C#程序我已经连接到mysql数据库 如何使用单引号字符指定密码, 获取下一个错误
Format of the initialization string does not conform to specification
starting at index
用于此连接字符串
Server = srv; Database = db; User Id = user; Password = 'ktrnhjyyst;
由于
答案 0 :(得分:2)
您需要引用包含受限制字符的令牌:
var cn = "Server=srv;Database=db;User Id=user;Password=\"'ktrnhjyyst;\"";