MySQL: Using MySQL with Node.js, NestJS, or TypeORM
This documentation is part of the Getting started guide. View the full guide here: How to get started with MySQL.
👋 Welcome to the Stackhero documentation!
Stackhero offers a ready-to-use MySQL cloud solution that provides a host of benefits, including:
- Unlimited connections and transfers.
- phpMyAdmin web UI included.
- Effortless updates with just a click.
- Optimal performance and robust security powered by a private and dedicated VM.
Save time and simplify your life: it only takes 5 minutes to try Stackhero's MySQL cloud hosting solution!
To connect from Node.js, NestJS, or TypeORM, you can add the ssl option as shown below:
TypeOrmModule.forRoot({
type: 'mysql',
host: '<XXXXXX>.stackhero-network.com',
port: <PORT>,
username: 'root',
password: '<ROOT_PASSWORD>',
database: 'root',
entities: [],
synchronize: true,
ssl: {}
});