hasen's tech life

Twitter: @hasen

MySQLのバッチを実行したら,エラーが出た.

# MySQLのバッチを実行したら,エラーが出た.

[Illuminate\Database\QueryException]
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'group add column created_at timestamp' at line 1 (SQL: alter table group add column created_at timestamp)

# 原因は'group'が予約語だったこと.'user_group'に変更して対応した.

さくらサーバを再起動後,SSHしたらエラーが出たので対応.

# さくらサーバを再起動後,SSHしたらエラーが出たので対応.

$ ssh xxx@xxx.xx.xx.xxx
> @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
> @ 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
> SHA256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.
> Please contact your system administrator.
> Add correct host key in /Users/You/.ssh/known_hosts to get rid of this message.
> Offending RSA key in /Users/You/.ssh/known_hosts:82
> RSA host key for 160.16.62.230 has changed and you have requested strict checking.
> Host key verification failed.

$ vi /Users/You/.ssh/known_hosts
-- xxx.xx.xx.xxxx ...

$ ssh xxx@xxx.xx.xx.xxx
> The authenticity of host 'xxx.xx.xx.xxx (xxx.xx.xx.xxx)' can't be established.
> RSA key fingerprint is SHA256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.
> Are you sure you want to continue connecting (yes/no)? yes
> Warning: Permanently added 'xxx.xx.xx.xxx' (RSA) to the list of known hosts.
> xxx@xxx.xx.xx.xxx's password:

> SAKURA Internet [Virtual Private Server SERVICE]

Laravel v5.2でRedisのエラーが出たので対応した.

# Laravel v5.2でRedisのエラーが出たので対応

# exception 'Predis\Connection\ConnectionException' with message 'Failed to parse address ":" [tcp://:]'
in /PATH/TO/vendor/predis/predis/src/Connection/AbstractConnection.php:155

# exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Call to a member function get() on null'
in /PATH/TO/vendor/laravel/framework/src/Illuminate/Cache/RedisStore.php:54

$ vi config/database.php
++ "redis" => [
++   "cluster" => false,
++   "default" => [
++     "host" => IP,
++     "password" => PASSWORD,
++     "port" => PORT,
++     "database" => 0,],],