ConnectionString .NET and mysql

ConnectionString .NET and mysql

cmurciacmurcia Posts: 4Questions: 2Answers: 0

Hi,

After reading the doc, I've been unable to start checking the demo project.
I always get error 7 when I try to connect mysql database. I'm not sure where to write the connectionstring info (user, pwd, server, db). In others projects, I use mysql.data libraries, and I create the stringconnection in the web.config, using mysql.data.provider in the providerName tag.
Please any help will be apreciatted.

Cesar

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,142Questions: 1Answers: 2,586
    Answer ✓

    Hi @cmurcia ,

    It going in the Properties/launchSettings.json. This is how it looks on my test machine:

        "Editor_NET_Core_demo": {
          "commandName": "Project",
          "launchBrowser": true,
          "launchUrl": "examples/index.html",
          "applicationUrl": "http://localhost:5000",
          "environmentVariables": {
            "ASPNETCORE_ENVIRONMENT": "Development",
            "DBTYPE": "mysql",
            "DBCONNECTION": "Server=127.0.0.1;Port=3306;Database=test;Uid=sa;Pwd=Pa55word123.;"
          }
        }
    

    Hope that helps,

    Cheers,

    Colin

  • cmurciacmurcia Posts: 4Questions: 2Answers: 0

    Perfect, thanks!!!

This discussion has been closed.