tiwanari / isucon2017-qualifier

わいわい
2 stars 2 forks source link

環境構築 #10

Open tiwanari opened 7 years ago

tiwanari commented 7 years ago

気づいた…ローカルの環境がほしいって…

tiwanari commented 7 years ago

MySQL

$ mysql -uroot 
> create user isubata@localhost identified by 'isubata';
> grant all on *.* to isubata@localhost identified by 'isubata';

DBを初期状態にもどすには、DBサーバーにログインして、次のコマンドを実行します。

$ cd db
$ sudo mysql -e 'DROP DATABASE IF EXISTS isubata; CREATE DATABASE isubata;'
$ sudo mysql isubata < ./isubata.sql
$ zcat isucon7q-initial-dataset.sql.gz | sudo mysql --default-character-set=utf8mb4 

Mac:

gzcat isucon7q-initial-dataset.sql.gz | sudo mysql --default-character-set=utf8mb4 -D isubata

Ubuntu:

zcat isucon7q-initial-dataset.sql.gz | sudo mysql --default-character-set=utf8mb4  -uroot -D isubata
ompugao commented 7 years ago

ubuntuだとこれでハマる ERROR 1698 (28000): Access denied for user 'root'@'localhost' - by shigemk2 http://www.shigemk2.com/entry/2017/07/27/ERROR_1698_%2828000%29%3A_Access_denied_for_user_%27root%27%40%27localhost%27

tiwanari commented 7 years ago

そういえば環境についてメモ

isucon@app2373:~$ cat /proc/cpuinfo
processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model       : 63
model name  : Intel(R) Xeon(R) CPU E5-2650 v3 @ 2.30GHz
stepping    : 2
microcode   : 0x1
cpu MHz     : 2294.702
cache size  : 4096 KB
physical id : 0
siblings    : 1
core id     : 0
cpu cores   : 1
apicid      : 0
initial apicid  : 0
fpu     : yes
fpu_exception   : yes
cpuid level : 13
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb lm constant_tsc arch_perfmon nopl eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm fsgsbase bmi1 avx2 smep bmi2 invpcid xsaveopt
bugs        :
bogomips    : 4589.40
clflush size    : 64
cache_alignment : 64
address sizes   : 46 bits physical, 48 bits virtual
power management:
isucon@app2373:~$ cat /proc/meminfo
MemTotal:        1016132 kB
MemFree:           64524 kB
MemAvailable:     629188 kB
Buffers:           70208 kB
Cached:           608396 kB
SwapCached:         1816 kB
Active:           525656 kB
Inactive:         371112 kB
Active(anon):     120276 kB
Inactive(anon):    98640 kB
Active(file):     405380 kB
Inactive(file):   272472 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:       4194300 kB
SwapFree:        4176128 kB
Dirty:               704 kB
Writeback:             0 kB
AnonPages:        217348 kB
Mapped:            31072 kB
Shmem:               784 kB
Slab:              39336 kB
SReclaimable:      28928 kB
SUnreclaim:        10408 kB
KernelStack:        2208 kB
PageTables:         3528 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     4702364 kB
Committed_AS:     673412 kB
VmallocTotal:   34359738367 kB
VmallocUsed:           0 kB
VmallocChunk:          0 kB
HardwareCorrupted:     0 kB
AnonHugePages:    174080 kB
CmaTotal:              0 kB
CmaFree:               0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:       45044 kB
DirectMap2M:     1003520 kB
DirectMap1G:           0 kB