mysql command line not working

Posted by Sandeepan Nath on Server Fault See other posts from Server Fault or by Sandeepan Nath
Published on 2011-01-12T13:32:00Z Indexed on 2011/01/12 13:55 UTC
Read the original article Hit count: 342

Filed under:
|
|
|

I have mysql running in my fedora system. I have xampp setup on the system and php projects present in the webspace are working fine. PhpMyAdmin is working fine. echoing phpinfo() in a PHP script also shows mysql enabled. But running mysql connect command

mysql -u[username] -p[password]

Gives this -

bash: mysql: command not found

How do I fix that? Any pointers?

I guess I need to do some pointing (define some path in some file) so that my system knows that mysql is installed. What exactly do I have to do?

Additional Details
This system was someone else's and he is not available here. May be PHP/Mysql was setup already in the system. I just freshly extracted xampp for linux into /opt/lampp/ and have put all the above mentioned things (PHP projects and PhpMyAdmin) there. After doing that I had a socket problem (PhpMyAdmin was not working and showing this)-

#2002 - The server is not responding (or the local MySQL server's socket is not correctly configured) 

I restarted lampp using ./lampp restart but problem remained. Then after turning on system today, I started lampp and everything worked just fine. No project issues anymore only command line Mysql not working

© Server Fault or respective owner

Related posts about linux

Related posts about mysql