SQL

Structured Query Language

SQL is an easy to understand language to interact with a database.

Basic SQL Commands

-- Show all databases in the system
SHOW DATABASES;

-- Switch to a specific database
USE [DATABASE];

-- Show all tables in the selected database
SHOW TABLES;

-- Retrieve all rows and columns from a table
SELECT * FROM [TABLE];

Relational databases

SQLite3

SQLite3 is a lightweight, single-file database suitable for small projects or embedded applications.

Key Commands:

MySQL

MySQL is a widely-used relational database, especially in web applications. It supports file reading, which requires proper permissions.

Key Commands:

Password Information:

  • Password file location: /var/lib/mysql/mysql/user.MYD

  • Hash type: mysql-sha1


PostgreSQL

PostgreSQL is an advanced relational database with support for robust features, including file imports.

Key Commands:


Last updated