Difference between revisions of "Connect to a database"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
− | * [[MariaDB]]: <code>[[mysql (command)|mysql]]</code> | + | * [[MariaDB]]: |
+ | ** <code>[[mysql (command)|mysql]]</code> | ||
+ | ** <code>[[mysql (command)|mysql]] NameOfYourDB</code> | ||
* [[PostgreSQL]]: [[psql]]: | * [[PostgreSQL]]: [[psql]]: | ||
** <code>[[sudo -u postgres psql]]</code> | ** <code>[[sudo -u postgres psql]]</code> |
Revision as of 19:40, 15 December 2022
- MariaDB:
- PostgreSQL: psql:
sudo -u postgres psql
psql service=MyConfiguredDB
($HOME/.pg service.conf)
\c name_of_db
or\connect name_of_db
- MongoDB:
mongo
,use DB_NAME
Related terms
\c
databasename
See also
- PostgreSQL:
psql
,.psqlrc, .pgpass
,$HOME/.pg service.conf
,-U, -W, -d
, meta-commands:\du, \dg, \ddp, \dp, \list, \dn, \dt, \c, \l, \di, \q
,show users
,show
,su - postgres
,psql -c, \?, \connect, \conninfo
,--version, --help
, PL/pgSQL - Databases: Database management, SQL, NoSQL, Wide column, PostgreSQL, MariaDB, MySQL, Derby DB, MongoDB, Cassandra, SQLite, HSQL2, H2, RocksDB, Microsoft SQL Server, DB2, Oracle Database, Memcached, Berkeley DB, Collation, SingleStore, Amazon Aurora, Graph database, Amazon DynamoDB, PrestoDB, Cache hit ratio, ACID, WAL, ARIES, DBMS, OLTP, OLAP, Database Schema, CockroachDB, Tables, Views, Apache Druid, RDMS
Advertising: