SQL SERVER - Create Connection

Guys, good night! I am new to studies with Adonis … and I can not create a connection with SQL server. in the documentation says it has support, but it does not show any example to create the connection using mssql … I tried to modify the existing configurations but I was not successful.
thank you if anyone can show me some example for this.

That is easy: in your project directory, you will find a hidden file called .env, open it and edit it according to your settings/credentials.

In the same directory, there is an other hidden file called .env.example . As its name suggests, it shows an example on how to file .env file.

1 Like

Hi @hiukky

Also, you need to install mysql or mysql2 driver :wink:
https://adonisjs.com/docs/4.1/database#_supported_databases

If you can share error message we might be able to help more

1 Like