mysql> show processlist;これで今動いてるプロセスが確認できる。
そしてkillしたいプロセスを
mysql> kill 1234;で強制終了できます。
http://spiri-tua-lism.com/?p=1132
mysql> show processlist;mysql> kill 1234;insert into TABLE (
col1,
col2,
col3
) select
val1,
val2,
val3
from TABLE2
insert into TABLE (
col1,
col2,
col3
) select
val1,
val2,
val3
from TABLE2
on duplicate key update col2 = values(col2), col3 = col3 + values(col3)update TABLE A, (
select
col1,
col2,
col3
from TABLE2
) B set A.col4 = B.col1 replace into TABLE (
col1
)
select col2 from TABLE2INSERT INTO user_table (id, name, memo, status) VALUES
(1, 'test1', 'メモ', 1),
(2, 'test2', 'メモ', 1),
(3, 'test3', 'メモ', 1),
(4, 'test4', 'メモ', 1);select
concat(
case when 1 then 2 else 3 end,
case when 0 then 4 else 5 end,
case when 1 then 6 else 7 end,
case when 0 then 8 else 9 end
) as test
select
concat_ws(
',',
case when 1 then 2 else 3 end,
case when 0 then 4 else 5 end,
null,
case when 0 then 8 else 9 end
) as testSELINUX=disabledPort 10022
PermitRootLogin no
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys# pear upgrade --force PEAR-1.5.4
# pear upgrade PEAR
# pear update-channels
pearが古い場合、最初に強制的に1.5.4にアップグレードする必要がある。# pear upgrade PEARerror_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED
date.timezone =Asia/Tokyo# yum remove sendmailinet_interfaces = all
myhostname = home.nainai16.com
mynetworks = 192.168.1.0/24
mydestination = $myhostname$db = DB::connect(DSN);$db = MDB2::connect(DSN);
$db->loadModule('Extended');$rs->fetchRow(DB_FETCHMODE_ASSOC)$rs->fetchRow(MDB2_FETCHMODE_ASSOC)$db->limitQuery($sql, 0, 10);$db->setLimit(10, 0);
$db->query($sql);$db->quoteSmart($v["value"])$db->quote($v["value"])find . -name \*.php -print xargs grep limitQuery
[mysqld]
default-character-set = utf8
skip-character-set-client-handshake[mysqld]
character-set-server = utf8
skip-character-set-client-handshakeecho sprintf("%05d", $number);echo str_pad($number, 5, "0", STR_PAD_LEFT);echo sprintf("%04d-%02d-%02d", $year, $month, $day);{$number|string_format:"%05d"}select lpad(number, 5, '0') from table;select to_char(number, '00000') from table;var number = 5;
alert(("0"+number).slice(-2));
> 05
alert(("00"+number).slice(-3));
> 005
カラム名、インデックス名、ストアされたルーチン名とカラムのエイリアスは、どのプラットフォームでも大文字と小文字が区別されません。トリガ名では大文字と小文字が区別されます。
select date1 - date2 from tableSELECT DATEDIFF('1997-12-31 23:59:59','1997-12-30');... from hoge h left outer join fuga f on h.id = f.id and h.yyyymm = 200912 ... from hoge h left outer join fuga f on h.id = f.id and h.yyyymm = '200912' SELECT id,title FROM table GROUP BY id HAVING COUNT(id) > 1;
"id1","name1","1","2","3"
"id2","name2","4","5","6"
"id3","name4","7","8","9"