rails执行sidekiq任务的时候报错“can't connect to local mysql server through socket '/var/run/mysqld/mysqld.sock'”
rails执行sidekiq任务的时候报错“can't connect to local mysql server through socket '/var/run/mysqld/mysqld.sock'”,
很好理解,就是找不到这个文件,而我机器上面文件在/tmp/mysql.sock这里,
所以解决很简单,在指定位置创建一个或创建一个链接呗:
ln -s /tmp/mysql.sock /var/run/mysqld/mysql.sock
完美解决,偶也^_^