JAEN

SQL

Connect (psql/mysql/sqlcmd)

SafeConnect to a DB

psql -h <host> -U <user> -d <db>

Connect with common DB clients (psql/mysql/sqlcmd).

Examples

  • mysql -h db01 -u app -pConnect to MySQL

Syntax

psql -h <host> -U <user> -d <db> | mysql -h <host> -u <user> -p | sqlcmd -S <host> -U <user>

Before you run it

Connect only.

Used when you see

Can't connect to the database
2
Attempt a connection and read the exact errorrefused=not listening/FW, timeout=path, auth=credentials.
See the whole flow →

Related commands

The same reference, with no signal at all

Every command on this site, held on your device. The app adds 632 more: 1,510 commands and 120 fix flows, searchable with no connection. Free to install, no ads (some content is a one-time purchase).

Get it free on the App Store