Support the ongoing development of Laravel.io →
Laravel Views Queues

How to get MySql connection id when user login into your web/system?

In MySQL you can directly query "select connection_id()" and to get the list is "show full processlist" But how should make it in Laravel? that every time a user login into the web/system i will get the users' connection id and store it in my users table.

I tried DB query. DB::select('select connection_id');

but when i query in MySQL. The connection id that i stored in users table is not in the list.

Last updated 3 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Emorej anonymouse703 Joined 10 May 2018

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.