MySQL Note

Reading time ~1 minute

This note is about the problems that I met while using MySQL.

1. Install

Just use apt-get install, easy, fast and enough to use.

$ sudo apt-get install mysql-server

2. Create User

Read the doc from official site.

mysql> CREATE USER 'monty'@'%' IDENTIFIED BY 'some_pass';

3. Grant

Read the doc from official site.

mysql> GRANT ALL ON db1.* TO 'jeffrey'@'localhost';

4. Encoding

Show the encoding type of current database.

mysql> show variables like "character_set_database";
mysql> show variables like "collation_database";

Show the encoding type of a table

mysql> show full columns from mytable;

Change the encoding type of a column

mysql> alter table table_name modify col_name varchar(255) character set utf8 collate utf8_general_ci;

竟然无法拒绝你的打赏

微信支付

专业处理中国护照照片一次通过

专业处理中国护照照片一次通过 Continue reading

Python Notes

Published on April 01, 2021

Scrum Training Notes

Published on December 01, 2020