View Full Version : How can I see if MySQL is running?
October 24th, 2010, 01:40 PM
It seems like I have some MySQL problems. First I have to ask how I can see in the terminal if any MySQL process is running?
I think maybe I have two different installations of MySQL on my system.
October 24th, 2010, 08:22 PM
If that command brings up version info about mysql, then it is running.
October 25th, 2010, 10:47 AM
So strange my MySQL mess?!? I have MySQL start/stop in prefpane and I start it with no problem (MySQL is running). When typing anything with MySQL in the terminal like
sudo -u passw -p
I get "-bash: mysqladmin: command not found"
or like you suggested
I get "sudo: mysql: command not found"
October 25th, 2010, 03:29 PM
Probably because those binaries are not located in locations that exist in your PATH environment variable.
In that case, you must type the full location of the binary in order to use it, like "/usr/bin/mysql" or "/usr/bin/mysqladmin" if those were located in "/usr/bin" (I don't know, just using that as an example).
October 25th, 2010, 03:35 PM
But maybe I should change the PATH. But where do I do that?
October 25th, 2010, 04:42 PM
Be careful with that. You can really hose yourself if you don't know what you're doing.
October 25th, 2010, 05:08 PM
Now it's becoming really interesting. As I was playing around with a MySQL installation tutorial before (don't remember the site) I vaguely remember that I did some configuration in a MySQL or php.ini file or something and then create a new .profile in my home directory. Now when I open the terminal I get a message saying:
Last login: Mon Oct 25 18:34:06 on ttys000
-bash: Add: command not found
I think the new .profile was named .bash_profile or .bash_login So maybe I will find that problem as well now. Somewhere in some file it's pointing to one of this wrongly .bash files. But from where does it point to that file?
September 30th, 2011, 06:05 PM
Matsaki, thanks for asking. I was having the same trouble. But it didn't help to change the path. It didn't matter what I did. But tfurp's suggestion showed me it was running. On stackoverflow someone said set up an alias so you don't need to enter the path, but that didn't work either. I'm about a year later than your question - on Snow Leopard 10.6.8 on an iMac. Did you figure out why you got "command not found?"