• Home
  • Category: Uncategorized

mysql ready reckoner cheatsheet

Create a database:

CREATE DATABASE appointments;

Use the created database:

USE appointments;

Create a user and grant him privileges to any database:

CREATE USER 'appointmentusr'@'localhost' IDENTIFIED BY 'arOcosIHPVJ78jBY66qu';
GRANT ALL PRIVILEGES ON appointments.* TO 'appointmentusr'@'localhost';

Create Table:

CREATE TABLE `appointments`.`customers` ( `cstID` INT NOT NULL , `Name` TEXT NOT NULL , `Age` INT NOT NULL , `Mobile` INT NOT NULL ) ENGINE = InnoDB;