Andy Dustman wrote:
> On 3/28/06, abe <[EMAIL PROTECTED]> wrote:
> > Andy Dustman wrote:
> > > On 3/28/06, abe <[EMAIL PROTECTED]> wrote:
> > > > Andy Dustman wrote:
> > > > > On 3/28/06, abe <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > > > OperationalError: (2002, "Can't connect to local MySQL server 
> > > > > > through
> > > > > > socket '/var/lib/mysql/mysql.sock' (13)")
> > > > >
> > > > > This indicates your MySQL server isn't running,
> > > > I think it is, since the admin site works fine if I use
> > > > manage.py runserver , doesn't it also use the server?
> > > >
> > > > %myproject]# ps -eadf|grep sql
> > > > root     18240 18044  0 12:32 pts/2    00:00:00 /bin/sh
> > > > /usr/bin/mysqld_safe
> > > > mysql    18268 18240  0 12:32 pts/2    00:00:00 /usr/libexec/mysqld
> > > > --basedir=/usr --datadir=/var/lib/mysql --user=mysql
> > > > --pid-file=/var/run/mysqld/mysqld.pid --skip-locking
> > > > --socket=/var/lib/mysql/mysql.sock
> > > >
> > > > unless 'MYSQL server' means somthing different from mysqld ??
> > > >
> > > >
> > > > > and you are using DATABASE_HOST="localhost".
> > > > well I use ='', but that should be the same
> > > >
> > > > but isn't that correct, since mysqld runs on the same host as django?
> > >
> > > Make sure apache can read /var/ilbmysql/mysql.sock. I'm a little
> > how do I do that? I can't 'become' apache
> > from the permissions it looks readable
> >
> > myproject$ ls -lst /var/lib/mysql/mysql.sock
> > 4 srwxrwxrwx  1 mysql mysql 0 Mar 28 12:32 /var/lib/mysql/mysql.sock
> > myproject$ ls -lst /tmp/mysql.sock
>
> But is the parent directory world-readable? i.e. ls -ld /var/lib/mysql

looks so:
ls -ld /var/lib/mysql
drwxr-xr-x  5 mysql mysql 4096 Mar 29 10:30 /var/lib/mysql


> > there a link to it in /tmp :
> > 4 lrwxrwxrwx  1 mysql mysql 25 Mar 23 16:58 /tmp/mysql.sock ->
> > /var/lib/mysql/mysql.sock
> > [EMAIL PROTECTED] myproject]$
> >
> > > surprised to see it put the socket there, since (on Gentoo)
> > > /var/lib/mysql is only accessible by the user the mysql server runs
> > > as, so it puts the socket (which needs to be world-readable and
> > > writable) in /var/run.
> >
> > >
> > > When you run manage.py runserver, are you running as root?
> > yes (should I?), but I can also run as myself, doesn't matter
>
> You probably shoudn't run it as root on general principle. Make sure
> you can access it as a non-root user. The error indicates it did not
> get as far as the authentication phase so I am still leaning towards
> filesystem permissions.

> You're not running a chroot apache by any chance, are you?
not that I know, but I didn't setup the system myself.
how do I to find out?

> SELinux? Some sort of virtualization?
idem. it's a scientific linux installlation (RHEL-like), I saw the
selinux libraries are installed.

> I guess you could try 127.0.0.1 for the database host which will make it use 
> TCP
> and see if that makes a difference.

Ah, that helped!
but I also had to change the mysqld that I'm running
from  /usr/bin/mysqld_safe (mysql 4) to
/usr/local/mysql/bin/mysqld_safe (mysql 5)

although the sockets they use are the same, and I still use mysqldb
that is
compiled with the mysql.h from mysql4

I can login to the admin site now, great!
but it seems that the css files are not accessible  because there is no
layout .
I copied the dir
/usr/lib/python2.3/site-packages/Django-0.91-py2.3.egg/django/contrib/admin/media/css

to /var/www/xxxx/ (where my project is, wasn't able to use it under my
own dir) but that didn't help

according to the admin page it expects the css in /xxxx/css :

<link rel="stylesheet" type="text/css" href="/xxxx/css/base.css" />

my settings.py has:
ADMIN_MEDIA_PREFIX = 'zbdb/'



thanks for the help and patience, 

-E


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to