开发者

return mysql thread_id

Whenever I connect to mysql using command prompt, It returns a thread_id开发者_开发百科 (64 in this case). Is it possible to get this number using Java (preferred) or PHP?

# mysql -h10.10.10.10 -uroot -proot@123
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 64
Server version: 5.0.77-log Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.


CONNECTION_ID function will help you.
Query:
SELECT CONNECTION_ID();

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜