sshでWARNING: POSSIBLE DNS SPOOFING DETECTED!エラー

sshでサーバーにつなごうとしたらエラーが..

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@       WARNING: POSSIBLE DNS SPOOFING DETECTED!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
The RSA host key for [sub.sample.jp]:10022 has changed,
and the key for the corresponding IP address [192.168.0.2]:10022
is unknown. This could either mean that
DNS SPOOFING is happening or the IP address for the host
and its host key have changed at the same time.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx.
Please contact your system administrator.
Add correct host key in /home/user/.ssh/known_hosts to get rid of this message.
Offending RSA key in /home/user/.ssh/known_hosts:9
  remove with: ssh-keygen -f "/home/user/.ssh/known_hosts" -R [sub.sample.jp]:10022
RSA host key for [sub.sample.jp]:10022 has changed and you have requested strict checking.
Host key verification failed.

接続先のIPが変わってたりすると起きるようです

$ ssh-keygen -R [sub.sample.jp]:10022

で直しました

Mysqlでのprimary keyとkeyを整理

mysqlのprimary key と key を整理

CREATE TABLE sample(
id int not null,
group_id int not null,
name varchar2(100),
age int,
PRIMARY KEY (id),
KEY(group_id)
);

PRIMARY KEYはプライマリーキー
KEYはINDEXのようです

カラム内に書くとPRIMARYは省略できるようで

CREATE TABLE sample(
id int KEY,
group_id int not null,
name varchar2(100),
age int,
KEY(group_id)
);

でもいいです

MySQL :: MySQL 5.6 リファレンスマニュアル :: 13.1.17 CREATE TABLE 構文

mysqlのtext型の最大サイズは?

WEBサイトの開発で、mysqlのtextのフィールドをつかったモデルにValidateをかけるためサイズを調べてみました

MySQL :: MySQL 5.1 リファレンスマニュアル (オンラインヘルプ) :: 6.5 データ型のストレージ要件

を参考に

textは 2の16乗 – 1 バイトまでのようです
65535バイトでValidateをかけるとよさそうです

unzipでneed PK compat. v4.5 (can do v2.1)のエラー

GUIでUbuntuをさわりたかったので
仮想ハードディスクイメージのダウンロード | Ubuntu Japanese Team
から仮想のイメージを落としてきて

$ unzip ubuntu-ja-14.04-desktop-amd64-vhd.zip

Archive:  ubuntu-ja-14.04-desktop-amd64-vhd.zip
   skipping: ubuntu-ja-14.04-desktop-amd64/ubuntu-ja-14.04-desktop-amd64.vhd  need PK compat. v4.5 (can do v2.1)

あれ、解凍できない
PKZIP formatとかいうのらしいので、対応しているので解凍

$ p7 e ubuntu-ja-14.04-desktop-amd64-vhd.zip

7-Zip [64] 9.20  Copyright (c) 1999-2010 Igor Pavlov  2010-11-18
p7zip Version 9.20 (locale=ja_JP.UTF-8,Utf16=on,HugeFiles=on,4 CPUs)

Processing archive: ubuntu-ja-14.04-desktop-amd64-vhd.zip

Extracting  ubuntu-ja-14.04-desktop-amd64/ubuntu-ja-14.04-desktop-amd64.vhd

Everything is Ok

これでできました
e は extract ですね