If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > How can I see all online users by using embedded SQL commands?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-30-04, 05:16
inancakcan inancakcan is offline
Registered User
 
Join Date: Jun 2004
Posts: 9
How can I see all online users by using embedded SQL commands?

Hi everybody,
I want to see all online users bt using embedded MySQL command in my application? That's allright "SHOW PROCESSLIST" line give fine results at my MySQL manager's SQL commands window. But how can i achieve that by using embedded SQL in my program? I looked all the tables if some of them changes when logged on to the my DB by using several logins. But I could not see anything related with that problem..It seems that all tables stay same..It seems MySQL cannot recognize new logged on user except "SHOW PROCESSLIST" command. But I could not use that command as a embedded SQL Query . What should I do? Thanks
Inanc
Reply With Quote
  #2 (permalink)  
Old 07-03-04, 20:23
yellowmarker yellowmarker is offline
Registered User
 
Join Date: Jul 2004
Location: Dundee, Scotland
Posts: 107
execute the SQL query "SHOW PROCESSLIST;"

A table with the following fields is returned:
Id, User, Host, db, Command, Time, State, Info

I assume the Id, User, and Host fields will enable you to solve the problem. note that the mysql table that this information is/might by stored in is not made available to us (it must be a MySQL internal thing).
Reply With Quote
  #3 (permalink)  
Old 07-05-04, 03:13
inancakcan inancakcan is offline
Registered User
 
Join Date: Jun 2004
Posts: 9
Table name is not "processlist"

I was trying to get some information of online users by using "SHOW PROCESSLIST" according to your advice ..Yes, you can get all information about online ones by using that command...It is OK...MySQL server feels comfortable with the command "SHOW PROCESSLIST"...but when i say ;

SELECT * FROM PROCESSLIST

It says there is no table with a name PROCESSLIST...so I wonder what is the name of that table including online users information...I think that point has a weak explanation in MySQL manual...thanks..

Regards
Reply With Quote
  #4 (permalink)  
Old 07-09-04, 02:29
inancakcan inancakcan is offline
Registered User
 
Join Date: Jun 2004
Posts: 9
I could not find a solution for that problem yet

I could not find a solution for that problem yet
Reply With Quote
  #5 (permalink)  
Old 07-15-04, 02:08
inancakcan inancakcan is offline
Registered User
 
Join Date: Jun 2004
Posts: 9
Is it Imposible?

Is it imposible?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On