larastream / internals

Issues board used for Larastream internals discussions.
2 stars 0 forks source link

Thread id (Connection id) is not in MySQL thread list. #75

Open anonymouse703 opened 5 years ago

anonymouse703 commented 5 years ago

Hello everyone,

I tried to make LoginUser Table for me to able to get all users connected in the server.

I have this code in Login Controller.

$con_id = DB::select('select connection_id()');

when I dd($con_id)

this is the result.

array:1 [▼
  0 => {#797 ▼
    +"connection_id()": 279
  }
]

and when I dd this $con_id = DB::select('show full processlist');

This is the result

array:4 [▼
  0 => {#797 ▼
    +"Id": 46
    +"User": "root"
    +"Host": "localhost:51545"
    +"db": "iaccsshsc07"
    +"Command": "Sleep"
    +"Time": 24
    +"State": ""
    +"Info": null
  }
  1 => {#802 ▼
    +"Id": 64
    +"User": "root"
    +"Host": "localhost:53014"
    +"db": "iaccsshsc07"
    +"Command": "Sleep"
    +"Time": 4
    +"State": ""
    +"Info": null
  }
  2 => {#803 ▼
    +"Id": 65
    +"User": "root"
    +"Host": "localhost:53027"
    +"db": "iaccsshsc07"
    +"Command": "Sleep"
    +"Time": 4
    +"State": ""
    +"Info": null
  }
  3 => {#804 ▼
    +"Id": 279
    +"User": "root"
    +"Host": "localhost:56385"
    +"db": "iaccsshsc07"
    +"Command": "Execute"
    +"Time": 0
    +"State": "init"
    +"Info": "show full processlist"
  }
]

But when I go to my MySQL and query Show full processlist

this will be the result.

Id = 46,64,65

The 279 is not in the list.

anonymouse703 commented 5 years ago

Moved to Laravel Repo(Support Question)

anonymouse703 commented 5 years ago

No answer