全文検索:
- 11 ERROR:1093を回避 @02_freebsd:04_database:01_mysql
- ない <code console> update hoge set code = 0 where id IN (select id from hoge as tmp where id = 1 group by id order by id) ; ERROR 1093 (HY000): You can't specify target table 'hoge' for update
- LEFT JOIN、INNER JOIN違い @02_freebsd:04_database:01_mysql
- e> mysql> SELECT * FROM table1; +------+------+ | id | name | +------+------+ | 1 | A | | ... e> mysql> SELECT * FROM table2; +------+------+ | id | name | +------+------+ | 1 | A | | ... > select * from table1 LEFT JOIN table2 ON table1.id=table2.id; +------+------+------+------+ | id | name | id | name | +------+------+------+------+
- ps @02_freebsd:80_unixコマンド
- as in long format F field| |g|pgrp|process group ID| |G|tpgid|controlling tty process group ID| |j|cutime|cumulative user time| |J|cstime|cumulative syst... |cumulative major page faults| |o|session|session ID| |p|pid|process ID| |P|ppid|parent process ID| |r|rss|resident set size| |R|resident|resident pages|
- MySQLコマンド @02_freebsd:04_database:01_mysql
- LL PRIVILEGES ON *.* TO 'testdb_user'@'localhost' IDENTIFIED BY PASSWORD '370f8eb673c9467f' | +------... rant all privileges on test.* to matsui@localhost identified by 'pass'; </code> === ユーザ追加(ユーザ作成権限付き) ... rant all privileges on test.* to matsui@localhost identified by 'pass' with grant option; </code> ===... RANT SELECT ON *.* TO 'readonly_user'@'localhost' IDENTIFIED BY 'pass'; </code> ==== ユーザ削除 ==== matui
- MySQL - 数値に変換してソート @02_freebsd:04_database:01_mysql
- とこのようになってしまいます。 <code console> mysql> select disk_id,backup_size from backups order by backup_size desc; +---------+-------------+ | disk_id | backup_size | +---------+-------------+ | ... して、無理やり数値へ変換する。 <code console> mysql> select disk_id,backup_size from backups order by backup_size + 0 desc; +---------+-------------+ | disk_id | backup_size | +---------+-------------+ | 39
- 05 rsync @02_freebsd:01_net
- る。コピー先としてネットワークでつながった別のホストを指定するときに使う | |--numeric-ids|ユーザとグループの id 番号を転送して、転送後にマッピング| |--force|ディレクトリが空でなくても削除| |--delete-excluded|受信側にある exclud ファイルも削除| ... xxback # /usr/local/bin/rsync -auvvz --numeric-ids --password-file=/etc/rsyncd.pass --delete --forc... /home --password-file ファイルからパスワードを得る --numeric-ids ユーザとグループの id 番号を転送して、転送後にマッピング。 --force
- MySQL - レプリケーション @02_freebsd:04_database:01_mysql
- mysql> GRANT REPLICATION SLAVE ON *.* TO repl@'%' IDENTIFIED BY '<password>'; ===== マスタサーバで更新ログを有効にする... の記述があるか確認して下さい。 <code> [mysqld] log-bin server-id=1 </code> <color red>※server-id は、1以上の整数であれば何でも良いです。</color> ===== テーブルへの書き込みを禁止 ===== mysql> FLU... vf data.tar.gz ==== my.cnf設定 ==== <code> server-id = 2 master-host = 172.16.8.53 master-
- PostgreSQLコマンド @02_freebsd:04_database:02_posgresql
- ===== PostgreSQLでのゼロパディング ===== # select lpad(id,4,'0') as id from t_images order by id desc; こんな感じで表示される <code> id ------ 0017 0015 0014 0012 0011 0010 0009 0008 0007 0
- FreeBSD カーネル再構築 @02_freebsd:99_その他
- #cpu I586_CPU cpu I686_CPU ident MYKERNEL # To statically compile i... # ATAPI tape drives options ATA_STATIC_ID # Static device numbering # SCSI Controllers... gh for aac (requires CAM) #device ida # Compaq Smart RAID #device
- MySQL - シェルで枠まで出力する @02_freebsd:04_database:01_mysql
- estdb -e 'select * from table1' +------+------+ | id | name | +------+------+ | 1 | A | | ... select * from table1' > /tmp/aaa # cat /tmp/aaa id name 1 A 2 B 3 C 4 D 5 E 6 F </code> たまにこの枠も欲しい... e1' > /tmp/aaa # cat /tmp/aaa +------+------+ | id | name | +------+------+ | 1 | A | |
- Apache 2.0 + MySQL + PHP @02_freebsd:02_www
- Commands end with ; or \g. Your MySQL connection id is 61 to server version: 4.0.26-log Type 'help... TABASE ABC; GRANT ALL ON ABC. * TO abc@localhost IDENTIFIED BY "123"; FLUSH PRIVILEGES; </code> ===
- WebDAV @02_freebsd:02_www
- exing AuthType Basic AuthName "Please Input ID and Password." AuthUserfile /etc/webdav.pa
- ipコマンド/IPエイリアス追加 @02_freebsd:80_unixコマンド
- ip link add link eth1 name eth1.210 type vlan id 210 ==== UP ==== ip link set eth1.210 up ===... ip link add link eth0 name eth0.100 type vlan id 100 ===== Bonding作成 ===== <code> # ip link add