Quote:
Originally Posted by mythiliram
The same thing i had done, without entering anything. It replied su: incorrect password.
|
Just for clearification. You don't have to become anyother user when connecting to mysql. MySQL uses a authentication method on its own. It's not any way related to the linux users or alike.
Quote:
Originally Posted by mythiliram
I changed the path to bin and gave the command ./mysql.
|
Normaly you don't have to change into the directory where the binary is you want to execute. They normaly reside inside the directories setup in th enviormental variable
$PATH.
To verify this do a
on the prompt.
Quote:
Originally Posted by mythiliram
I got the error ":cant connect to mysql server through socket /var/lib/mysql/mysql.sock."
|
This is where it's getting intresting. What the error message is trying to tell you is that there is no file(socket) at /var/lib/mysql/mysql.sock.
This can have variable cause. First check if the file is there
If not see if mysql itself is running
Code:
ps aux | grep mysql
which either resides in
/etc or on debian like distributions
/etc/mysql
If not start it with
Code:
/etc/init.d/mysql start
If mysql is allready running take a look at the config file of mysql.
my.cnf
Somewhere in there it should tell you where the socket resides.
check out the man page of mysql to get an overview of possible options like
-u
-p
-h
-P