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

2
  • 1) what is the error message you have encountered; 2) is the mysql running fine; 3) is your firewall allow the connections or not Commented Oct 1, 2019 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 Commented Oct 1, 2019 at 11:01

1 Answer 1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.