Search
 
SCRIPT & CODE EXAMPLE
 

SQL

Failed to connect to localhost:1433 - self signed certificate

const config = {
  port: parseInt(process.env.DB_PORT, 10),
  server: process.env.DB_HOST,
  user: process.env.DB_USER,
  password: process.env.DB_PASS,
  database: process.env.DB_Database,
  stream: false,
  options: {
    trustedConnection: true,
    encrypt: true,
    enableArithAbort: true,
    trustServerCertificate: false,

  },
}

sql.connect(config).then(pool => {
  if (pool.connecting) {
    console.log('Connecting to the database...')
  }
  if (pool.connected) {
    console.log('Connected to SQL Server')
  }
})
Comment

PREVIOUS NEXT
Code Example
Sql :: sql update from select 
Sql :: conda install pymysql "windows" 
Sql :: how to move a columns location in mysql 
Sql :: apex add months to date 
Sql :: sql get number of days between two dates 
Sql :: show all users in mysql 
Sql :: sort by last three charecter in sql 
Sql :: update set with inner join oracle 
Sql :: row number mysql 
Sql :: table drop if exist sql server 
Sql :: mysql sum cast decimal without round 
Sql :: get first 3 letters in sql 
Sql :: oracle create program if not exists 
Sql :: alter table in mysql 
Sql :: mysql all columns 
Sql :: mariadb.service: Main process exited, code=exited, status=1/FAILURE 
Sql :: oracle user privileges 
Sql :: oracle sql create view 
Sql :: convert to hexadecimal sql 
Sql :: use of now() in mysql 
Sql :: mysql create timestamp column 
Sql :: date in where on datetime column clause mysql 
Sql :: python mysql query to dataframe 
Sql :: sql not contains 
Sql :: scaffold mysql database 
Sql :: sql create index 
Sql :: oracle source code 
Sql :: flask sqlalchemy default value 
Sql :: postgres type cast to string 
Sql :: temp table sql 
ADD CONTENT
Topic
Content
Source link
Name
7+5 =