Compare the common operations of the two databases. Use the built-in client programs. MySQL command line: mysql-u user name-h host address-P port number database name-pPostgreSQL command line: psql-U user name-h host address-p port number database name Operation comparison: mysqlpsqlSHOWDATABASES; lUSEdb-name;
Compare the common operations of the two databases. Use the built-in client programs. MySQL command line: mysql-u user name-h host address-P port number database name-p PostgreSQL command line: psql-U user name-h host address-p port number database name Operation comparison: mysql psqlSHOW DATABASES; \ lUSE db-name;
Compare the common operations of the two databases. Use the built-in client programs.
MySQL command line:
Mysql-u username-h host address-P port number database name-p
PostgreSQL command line:
Psql-U username-h host address-p port number Database Name
Operation comparison:
Mysql psqlSHOW DATABASES; \ lUSE db-name; \ c db-nameSHOW TABLES; \ dSHOW USERS; \ duSHOW COLUMNS; \ d table-nameSHOW PROCESSLIST; SELECT * FROM pg_stat_activity; SELECT now () \ G \ x can enable and disable functions similar to \ g source/path. SQL \ I/path. sqlLOAD data infile... \ copy... \ h \?
Original article address: MySQL & PostgreSQL small command comparison, thanks to the original author for sharing.