Repository containing the queries developed in 👉 MySQL 👈
🌖 DDL - Data Definition Language
🌗 DML - Data Manipulation Language
🌘 DQL - Data Query Language
🌑 DTL - Data Transaction Language
🌒 DCL - Data Control Language
Installation [🚀 Windows]
mysqlsh --user root --host localhost --port 3306 -p
\sql
sudo pacman -S mysql
sudo mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
sudo pacman -S libsecret
sudo pacman -S gnome-keyring
sudo pacman -S mysql-workbench
mysql -u root -h localhost -p
USE mysql
ALTER USER 'root'@'localhost' IDENTIFIED BY 'my_password';
exit
sudo systemctl start mariadb
sudo mysql_secure_installation
sudo systemctl status mariadb
sudo mysql -u root -p
sudo mysql -u root -h localhost -p
sudo mysql --user root --host localhost -p
SHOW DATABASES;
CREATE DATABASE mysql_db;
USE mysql_db;
SHOW TABLES;
SHOW CREATE TABLE products;
INSERT INTO products (description, brand, price) VALUES ('Notebook', 'LeNovo', 1500);
INSERT INTO products (description, brand, price) VALUES ('Caneta', 'Bic', 2);
INSERT INTO products (description, brand, price) VALUES ('Fita', 'Durex', 10);
INSERT INTO products (description, brand, price) VALUES ('Massa', 'Miojo', 2);
INSERT INTO products (description, brand, price) VALUES ('Leite', 'Ninho', 12);
INSERT INTO products (description, brand, price) VALUES ('Cereal', 'Sucrilhos', 20);
TRUNCATE TABLE products
pager less -S