Portal Home > Knowledgebase > Articles Database > ssh mysql process command?
ssh mysql process command?
Posted by TheInsaneManiac, 08-31-2008, 05:43 PM |
I can't seem to figure it out, every time I mysqladmin processlist, I get an error telling me I am not using a password for localhost?
|
Posted by layer0, 08-31-2008, 05:59 PM |
use
mysqladmin -p processlist
|
Posted by TheInsaneManiac, 08-31-2008, 06:18 PM |
Ok, well we are getting somewhere, but it's really weird? I only saw one process and that process was the command i just ran to see the processes?
|
Posted by layer0, 08-31-2008, 06:21 PM |
Sounds like mytop may be better suited for what you want.
http://jeremy.zawodny.com/mysql/mytop/
|
Posted by Jedito, 08-31-2008, 06:32 PM |
mysqladmin -i1 processlist
Will run the same command every 1 second
|
Posted by TheInsaneManiac, 08-31-2008, 07:21 PM |
How would I go about using the regular top command?
Same thing, it only shows one process.
|
Posted by Jedito, 08-31-2008, 07:25 PM |
maybe you don't have mysql process running?
|
Posted by foobic, 08-31-2008, 07:38 PM |
Are you running it as root? As a regular user it will show only that user's processes.
|
Posted by TheInsaneManiac, 08-31-2008, 08:04 PM |
Well if I am the user running the processes then shouldn't it show them?
|
Posted by foobic, 08-31-2008, 08:22 PM |
Yes, provided it's the same database user. If it's a CPanel system and you're connecting as, for example, cpanel username "maniac" you probably won't see processes belonging to database user "maniac_dbuser".
|
Posted by FS - Mike, 08-31-2008, 08:30 PM |
MySQL will only show you the processes that your user has access to, unless you use root where it will show all MySQL processes.
You would need to log in as the user from the database, like foobic's example above.
Hope that helps,
Mike
|
Posted by TheInsaneManiac, 09-01-2008, 05:08 PM |
OHhhh, so how would I connect to a specific database then?
|
Posted by foobic, 09-01-2008, 06:22 PM |
You'd connect with the database username (maniac_dbuser or whatever) and password you created in the MySQL section of your panel (the same user / pass you put in your application's config file).
Edit: you won't be seeing all connections to a specific database though, the best you can do is see all processes running as that specific user.
Last edited by foobic; 09-01-2008 at 06:28 PM.
|
Posted by TheInsaneManiac, 09-01-2008, 10:13 PM |
Can I get the exact command for that, cause everything I have tried is failing.
|
Posted by foobic, 09-01-2008, 10:30 PM |
Substitute maniac_dbuser with your real database username and enter the corresponding password at the prompt. What errors are you getting? You may need to give the db user all privileges in CPanel.
|
Posted by TheInsaneManiac, 09-03-2008, 12:18 AM |
Cool. Now if I add a 1 second interval to it, how would I stop it without exiting considering I can't type anything?
ALSO: Is everything in the db process list a query? Even running process list?
|
Posted by foobic, 09-03-2008, 01:02 AM |
1. Ctrl-C
2. The manual gives you examples of what processes you may find in the process list.
|
Add to Favourites Print this Article
Also Read