List:General Discussion« Previous MessageNext Message »
From:BOB SCOTT Date:May 14 1999 5:50am
Subject:Can't connect to local MySQL server (again!)
View as plain text  
Hello all...

I've been fighting with MySQL for the last couple of
days and can't seem to figure out why I can't connect
to the server in some instances.  

Basically, my problem is that I can't connect to the
local MySQL server as a non-root user.

Here's a quick synopsis of what's happening:


===================================================

[norman@linux norman]$ mysql
ERROR 2002: Can't connect to local MySQL server (2)
[norman@linux norman]$ mysql -u web -p
Enter password:
ERROR 2002: Can't connect to local MySQL server (2)
[norman@linux norman]$ su -
Password:
[root@linux /root]# mysql -u web -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 14 to server version: 3.22.16a-gamma

Type 'help' for help.

mysql> quit
Bye
[root@linux /root]# mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 15 to server version: 3.22.16a-gamma

Type 'help' for help.

mysql> quit
Bye

===================================================

I thought it might be a problem with basic file permissions
but that looks OK.  All users can read all files in 
my datadir directory (/var/lib/mysql/).

[root@linux /root]# ls -l /var/lib/
total 1973
	.
	.
drwxrwxr-x  12 mysql    root         1024 May 12 14:33 mysql
	.
	.

[root@linux /root]# ls -l /var/lib/mysql
total 36
-rw-rw-r--   1 mysql    root        10311 Apr  5 10:41
linux.xxxxxx.com.err
drwxrw-r--   2 mysql    root         1024 Apr 20 10:34 losty
drwxrwxr-x   2 mysql    root         1024 Feb 15 12:34 mysql
srwxrwxrwx   1 mysql    root            0 May 12 14:33 mysql.sock
-rw-r--r--   1 mysql    root            5 May 12 14:33 mysqld.pid
drwxrw-r--   2 mysql    root         1024 Feb 28 17:52 promus
drwxrwxr-x   2 mysql    root         1024 Feb 15 12:34 test
drwxrw-r--   2 mysql    root         2048 Apr 20 18:29 web
[root@linux /root]#

mysqld was started using safe_mysqld with the --user=mysql switch.

[root@linux /root]# ps ax | grep safe_mysqld
13425  ?  S    0:00 sh /usr/bin/safe_mysqld --user=mysql
--pid-file=/var/lib/mys
19806  p4 S    0:00 grep safe_mysqld

I'm running MySQL 3.22.16a-gamma on Linux kernel 2.0.36 (RedHat 5.2)

If any of you kind people on this list could help me, I'd be willing
to add names to my will ;)


TIA
Bob Scott
Thread
Can't connect to local MySQL server (again!)BOB SCOTT14 May
  • Re: Can't connect to local MySQL server (again!)Jens Ellegiers14 May
  • Re: Can't connect to local MySQL server (again!)Thimble Smith14 May
    • Re: Can't connect to local MySQL server (again!)Darrell Shifflett14 May
  • Re: Can't connect to local MySQL server (again!)BOB SCOTT14 May
    • Re: Can't connect to local MySQL server (again!)Thimble Smith14 May
  • Re: Can't connect to local MySQL server (again!)BOB SCOTT14 May
  • Re: Can't connect to local MySQL server (again!)Pat Sherrill14 May