This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DROP TABLE IF EXISTS products ; | |
CREATE TABLE `products` ( | |
`id` int(11) unsigned NOT NULL AUTO_INCREMENT, | |
`created_at` datetime DEFAULT CURRENT_TIMESTAMP, | |
`updated_at` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, | |
`created_user` int(11) NOT NULL DEFAULT '0', | |
`updated_user` int(11) NOT NULL DEFAULT '0', | |
`product_name` varchar(100) NOT NULL, | |
`std_price` int(11) NOT NULL DEFAULT '0', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql> create database recovery; | |
Query OK, 1 row affected (0.00 sec) | |
mysql> use recovery; | |
Database changed | |
mysql> create table tab1 (id int,detail char(10)) engine=innodb; | |
Query OK, 0 rows affected (0.02 sec) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE `m_users` ( | |
`id` bigint(20) unsigned NOT NULL, | |
`created_at` datetime DEFAULT CURRENT_TIMESTAMP, | |
`updated_at` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, | |
`name` varchar(50) NOT NULL DEFAULT '', | |
`login_id` varchar(50) NOT NULL DEFAULT '', | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
L=/usr/local/bin/conoha-ojs && curl -sL https://github.com/hironobu-s/conoha-ojs/releases/download/v20150406.1/conoha-ojs-linux.amd64.gz | zcat > $L && chmod +x $L |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysqldump -umyadm -p --no-data database1 > /tmp/database1.def_only.dump |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# cat /usr/share/munin/plugins/url_status_ | |
#!/bin/sh | |
#%# family=auto | |
#%# capabilities=autoconf suggest | |
_url=`basename $0 | sed 's/^url_status_//g' | sed 's/--/\//g'` | |
if [ "$1" = "autoconf" ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /etc/munin/plugins | |
unlink sendmail_mailqueue | |
unlink sendmail_mailstats | |
unlink sendmail_mailtraffic | |
unlink users | |
unlink threads | |
unlink proc_pri | |
unlink entropy | |
unlink irqstats |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /tmp ; wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm | |
rpm -ivh epel-release-6-8.noarch.rpm | |
# ※amazon linux の場合は、epel 入っているっぽなので、不要です | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@server01~]# parted -l | |
モデル: BUFFALO HD-QLSU2/R5 1 (scsi) | |
ディスク /dev/sda: 6001GB | |
セクタサイズ (論理/物理): 512B/512B | |
パーティションテーブル: gpt | |
番号 開始 終了 サイズ ファイルシステム 名前 フラグ | |
1 20.5kB 210MB 210MB fat32 EFI System Partition boot | |
2 211MB 6001GB 6001GB Usb HD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DROP TRIGGER IF EXISTS users_del ; | |
DELIMITER ;; | |
/*!50003 CREATE TRIGGER test.users_del AFTER DELETE ON test.users | |
FOR EACH ROW | |
BEGIN | |
INSERT INTO arc_test.users (id,name) VALUES (OLD.id,OLD,name) ; | |
END */;; |
NewerOlder