SQL

created : 2020-04-07T11:34:32+00:00
modified : 2022-03-25T18:28:59+00:00

sql

Mysql User Create

create user 'username'@'localhost' identified by 'password'

Grant privileges

grant all privileges on *.* to 'username'@'localhost';
grant all privileges on 'DBname'.* to 'username'@'localhost';

Drop User

drop user 'username'@'localhost';

Create Database

CREATE DATABASE 'DBname';

Create Table

CREATE TABLE table_name
(
column1 data_type(size),
column2 data_type(size),
column3 data_type(size),
...
)