LoginSignup
4
4

More than 5 years have passed since last update.

mysql tips

Last updated at Posted at 2014-10-31

カラム一覧を取得

select * from INFORMATION_SCHEMA.COLUMNS where TABLE_SCHEMA = 'DB名' and TABLE_NAME = 'テーブル名' order by TABLE_NAME;

データだけを1行ずつ出力

mysqldump -c --skip-extended-insert -t DATABASE_NAME -u USER_NAME > dump.sql

エラーが起きた行は無視して取り込む

mysql -u root DATABASE_NAME -f < dump.sql

utf8を指定

--default-character-set=utf8

4
4
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
4
4