Unanswered: How can I see all online users by using embedded SQL commands?
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
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).
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..