Connect to Database
Command description
Connect to a database before executing SQL. The command supports MySQL, PostgreSQL, SQLite, Oracle, and SQL Server. No additional database driver installation is required. For a remote database, ensure that the database server accepts remote connections.
Command Input Parameters
| input parameters | Input parameter type | Description |
|---|---|---|
| Type | enum | MySQL, PostgreSQL, SQLite, Oracle, SQL Server |
| Username | str | |
| Password | str | |
| host | str | Database server hostname or IP address |
| Port | int or str | |
| Name | str | Database name or service name |
| Encoding | str | |
| Path | str | Database file path; required only when Type is SQLite |
Command Output Parameters
| Output parameters | Output parameter type | Description |
|---|---|---|
| SQL Connection Object | SQLConnection |
Default port number:
- MySQL 3306
- PostgreSQL 5432
- Oracle 1521
- SQL Server 1433