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 > 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? SELinux? Some sort of virtualization? 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. -- The Pythonic Principle: Python works the way it does because if it didn't, it wouldn't be Python. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---