2

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 :)

Shivani
  • 153
  • 9
  • 1) what is the error message you have encountered; 2) is the mysql running fine; 3) is your firewall allow the connections or not – Bagus Tesa Oct 01 '19 at 10:39
  • @BagusTesa, 1) Unable to connect to any of the specified MySQL hosts. 2) Yes it's perfectly running without password. 3) Yes – Shivani Oct 01 '19 at 11:01

1 Answers1

2

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