使用redis 报错Address already in use redis无法启动问题 oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo

报错Address already in use 表示的6379端口被占用
或者报以下错误

60192:C 17 Jan 2019 00:04:58.948 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
60192:C 17 Jan 2019 00:04:58.948 # Redis version=5.0.2, bits=64, commit=00000000, modified=0, pid=60192, just started
60192:C 17 Jan 2019 00:04:58.948 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
60192:M 17 Jan 2019 00:04:58.949 * Increased maximum number of open files to 10032 (it was originally set to 256).
60192:M 17 Jan 2019 00:04:58.950 # Creating Server TCP listening socket *:6379: bind: Address already in use

解决方法
我的是mac 在你的bin 目录下输入命令
找到这个进程,使用命令

ps -ef | grep -i redis

出现

  macdeMacBook-Pro:bin mac$ ps -ef | grep -i redis
  501    60184  60058   0 12:04上午 ttys000    0:00.12 redis-server *:6379
  501    60196  60186   0 12:07上午 ttys003    0:00.00 grep -i redis

找到上面这个redis-server的进程号为60184的(这个填写你自己的,我的是60184),然后杀死这个进行,执行命令

kill -9 60184

kill - 9 表示强制杀死该进程( kill -9 id);

OK

你可能感兴趣的:(node,redis,数据库)