Skip to content

Instantly share code, notes, and snippets.

CREATE TABLE `article_test` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`title` varchar(255) DEFAULT NULL COMMENT 'タイトル',
`content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '本文',
PRIMARY KEY (`id`),
) ENGINE=InnoDB DEFAULT CHARSET=utf8
@vuvanly
vuvanly / file0.sql
Last active August 14, 2016 17:25
MySQLで全てのクエリの確認 ref: http://qiita.com/vuvanly/items/525592cbc80c25efdcea
mysql> show full processlist\G;
*************************** 6. row ***************************
Id: <接続識別子、これは、INFORMATION_SCHEMA.PROCESSLIST テーブルの ID カラムの値>
User: <発行したMySQLユーザー>
Host: <発行しているクライエントのホスト名>
db: <データベース名>
Command: <コメンド種類:Query, Connect, Sleep等>。クエリの場合、Queryになる
Time: <現在の状態どれだけ続いている(数秒)>
State: <コメンドの状態:Sending data等>
Info: <クエリ文>
SELECT
table_schema as `Database`,
table_name AS `Table`,
round(((data_length + index_length) / 1024 / 1024), 2) `Size in MB`
FROM information_schema.TABLES
ORDER BY (data_length + index_length) DESC;
nohup mysql -u <username> -p --max_allowed_packet=12000M <db_name> < <file_path> &