typeorm: [Nest] 487576 [TypeOrmModule] Unable to connect to the database. Retrying (9)...
Issue type:
[ x] question [ ] bug report [ ] feature request [ ] documentation issue
Database system/driver:
[ ] cordova
[ ] mongodb
[ x] mssql
[ ] mysql / mariadb
[ ] oracle
[ ] postgres
[ ] cockroachdb
[ ] sqlite
[ ] sqljs
[ ] react-native
[ ] expo
TypeORM version:
[ ] latest
[ ] @next
[x ] 0.2.24 (or put your version here)
Steps to reproduce or a small repository showing the problem:
Hi! I have problem with connection to database. On first server application start without erorrs and don’t have problems with connection to db. On the second server I have error ‘Unable to connect to the database’. On second server I can check connection in manager DB, and it works. What can go wrong?
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 20 (5 by maintainers)
I was facing a similar problem and using the
mysql2module helped me.You can also try
--tls-min-v1.0when running nodehttps://github.com/nodejs/node/issues/27384
This issue was caused by node.js version. With node.js 10.19.0 my app work, but with node.js v 12.x.x - not.
For me, it is An Error that the entity directory is fasle.
Change the directory and You can see it works.
this worked for me (node 14.15.1),
thanks very much @imnotjames