Page 1 of 1

How do I get to the mysql prompt ?

PostPosted: 03. December 2010 12:29
by samsung61
Hi

I have done a search for this but not found anything that relates to my version of the problem, so I hope I am not repeating a question. Please bear with me if I am

When I try
#:/opt/lampp/bin$ mysql -uroot -p

OR
#:/opt/lampp/bin$ mysql

I get
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Has anyone an ideas all I want is the mysql command line to work

Thanks
Sam

Kubuntu 10.5
Xampp for linux 1.7.3a

Re: How do I get to the mysql prompt ?

PostPosted: 05. December 2010 02:56
by greno
samsung61 wrote:ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)


This means the mysql you are trying to use is not running.

Check your PATH. Maybe you don't have /opt/lampp/bin first in your path.

Or: make sure XAMPP is running:
/opt/lampp/lampp start

Make sure mysql starts and stays running.
ps -ef | grep -i mysql # do you see a PID for mysqld?

Then try:
/opt/lampp/bin/mysql -u root -p


-Gerry