Robert,

>> 3) If it's running, you have a privilege problem. If your MySQL
>> installation is new, you'll have just some basic users set up. One of
>> them is called "root", who can connect from localhost without
>> password. Thus, try this: "mysql -uroot".

> "mysql -uroot" gives me the following error message:
> "ERROR 2002: Can't connect to local MySQL server through socket 
> '/var/lib/mysql/mysql.sock'  (2)"

Okay, my guess was wrong. It's not a privilege problem, it's a socket
problem. You can specify the socket through which to connect when
under Unix and connecting via localhost in a number of ways:

a) In one of the my.cnf files,

b) as a server start option on the command line,

c) in a script that starts the server with an appropriate option.

For a), you could look into /etc/my.cnf; maybe there's something
wrong. You could also check ~/.my.cnf. Look for socket entries both in
the [mysqld] and [client] sections.

b) It's pretty unlikely that you start the server with a wrong socket
option manually.

c) There's a good chance that a start script will start the server
with an option that's not apt to your system setup. Look for the
script mysqld_safe and check for "socket".

d) Maybe mysqld can't create a socket in /var/lib/mysql/. Check the
file permissions for this directory.

If everything fails and you can't find a solution for your problem,
you can connect via TCP/IP. In this case, specify the host and DON'T
use localhost as host name, but rather the name of your machine.
Suppose it's called 'machine', you would connect like this:

mysql -hmachine -uroot

(Frankly said, I'm not a Unix user, so others might be a better help
if this can't solve your problems.)

Regards,
--
  Stefan Hinz <[EMAIL PROTECTED]>
  iConnect GmbH <http://iConnect.de>
  Heesestr. 6, 12169 Berlin (Germany)
  Telefon: +49 30 7970948-0  Fax: +49 30 7970948-3

[filter fodder: sql, mysql, query]


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to