MySQL CLI Cheat Sheet

show databases; – показывает все базы данных
create database sport; – создаёт базу данных `sport`
use sport; – использовать базу дынных `sport`
set names utf8 collate utf8_unicode_ci;
SHOW TABLE STATUS; – shows information about all table in db, including collation.
show full columns from post;

Collation

SHOW TABLE STATUS; – shows information about a table, including the collation.
ALTER TABLE convert to character set utf8 collate utf8_unicode_ci; – change table collation
ALTER TABLE post collate latin1_general_cs;

Leave a Reply