0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

mysql メモ

0
Last updated at Posted at 2018-10-20

■コマンドラインからsqlを実行

mysql -u[user] -p[password] -h[dbName] < sqlファイル

■表示系

テーブル一覧
show tables

カラム一覧
show columns from [tableName]

VIEWの中身を確認
show creaet view [viewName]

■設定系

接続時間の確認

wait_timeoutの値を確認
デフォルトは8時間
show global variables like '%wait%'

+---------------------------------------------------+----------+
| Variable_name                                     | Value    |
+---------------------------------------------------+----------+
| innodb_lock_wait_timeout                          | 50       |
| innodb_spin_wait_delay                            | 6        |
| lock_wait_timeout                                 | 31536000 |
| performance_schema_events_waits_history_long_size | 10000    |
| performance_schema_events_waits_history_size      | 10       |
| wait_timeout                                      | 28800    |
+---------------------------------------------------+----------+
6 rows in set, 1 warning (0.25 sec)
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?