Shivani
Shivani

Reputation: 151

.Net connection string to connect MySQL localhost Without Password

What will be the connection string in appsettings.json file for MySQL localhost without password for root? I tried below but not working!

Server=localhost;Port=3306;Database=myDbName;Uid=root;SslMode=none 

On the opposite direction, I also set password for root user using user accounts in phpMyAdmin as describe here https://stackoverflow.com/a/34562915/11276273 But no luck.

Please suggest the solution.

Thanks in advance :)

Upvotes: 2

Views: 3007

Answers (1)

fenil patel
fenil patel

Reputation: 84

Instead of localhost, try using your local IP address in the connection string and Modify the Host name to ANY HOST for root user from phpmyadmin enter image description here

Upvotes: 2

Related Questions