01- Basics

How to enter and view databases, create them, delete them, and make backup copies.

MySQL Version

Connect to MySQL

Show All Databases

// Connect to MySQL > mysql -u root -p // MySQL Version > mysql --version // Show All Databases > show databases; // Create Databases > create database pokeadso; // Connect to Database > use pokeadso; // Create table gyms Create table gyms ( id int auto_increment, nanme varchar(32) not null unique, PRIMARY KEY(id) ); // Create tablea trainers // Create table pokemons create table pokemons( id int auto_increment, name varchar(32) not null unique, type varchar(32) not null, strength int not null, staming int not null, speed int not null, accuracy int not null, PRIMARY KEY(id), trainer_id int, FOREIGN KEY(trainer_id) REFERENCES trainers(id) );