ADO.NET connection string and password with "=" in it

How can I build a connection string that includes a password that has "=" in it? (I am connecting to MySql 5.1)

For example, suppose the password is "Ge5f8z = 6", what would the connection string look like?

I tried:

Server=DBSERV;Database=mydb;UID=myuser;PWD="Ge5f8z=6"; 

and

 Server=DBSERV;Database=mydb;UID=myuser;PWD=Ge5f8z=6;" 

Both do not work.

+4
source share
2 answers

Use two == characters.

So it will be

  Server=DBSERV;Database=mydb;UID=myuser;PWD=Ge5f8z==6;" 
+5
source

Source: https://habr.com/ru/post/1306125/


All Articles