[Devel] [ 6354] -

Evgeny Sinelnikov sin etersoft.ru
1 15:31:02 MSK 2010


1  2010. 15:18  Evgeny Sinelnikov <sin  etersoft.ru> :
> 1  2010. 15:08  <bugs  lists.etersoft.ru> :
>> http://bugs.etersoft.ru/show_bug.cgi?id=6354
>>
>>
>>   <yv  etersoft.ru> changed:
>>
>>      What  |Removed           |Added
>> ----------------------------------------------------------------------------
>>    Hours Worked|              |0.02
>>
>>
>>
>>
>> --- Comment #3 from   <yv  etersoft.ru> 2010-11-01 15:08:30 ---
>> :
>>
>
> ,  ...
>
>> [guest  standpm weblog]$ ./manage.py runserver
>> Validating models...
>> Unhandled exception in thread started by <function inner_run at 0x843e64c>
>> Traceback (most recent call last):
>> File "/usr/lib/python2.5/site-packages/django/core/management/commands/runserver.py", line 48, in inner_run
>>  self.validate(display_num_errors=True)
>> File "/usr/lib/python2.5/site-packages/django/core/management/base.py", line 249, in validate
>>  num_errors = get_validation_errors(s, app)
>> File "/usr/lib/python2.5/site-packages/django/core/management/validation.py", line 67, in get_validation_errors
>>  connection.validation.validate_field(e, opts, f)
>> File "/usr/lib/python2.5/site-packages/django/db/backends/mysql/validation.py", line 15, in validate_field
>>  db_version = connection.get_server_version()
>> File "/usr/lib/python2.5/site-packages/django/db/backends/mysql/base.py", line 297, in get_server_version
>>  self.cursor()
>> File "/usr/lib/python2.5/site-packages/django/db/backends/__init__.py", line 81, in cursor
>>  cursor = self._cursor()
>> File "/usr/lib/python2.5/site-packages/django/db/backends/mysql/base.py", line 281, in _cursor
>>  self.connection = Database.connect(**kwargs)
>> File "/usr/lib/python2.5/site-packages/MySQLdb/__init__.py", line 74, in Connect
>>  return Connection(*args, **kwargs)
>> File "/usr/lib/python2.5/site-packages/MySQLdb/connections.py", line 170, in __init__
>>  super(Connection, self).__init__(*args, **kwargs2)
>> _mysql_exceptions.OperationalError: (2002, "Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'
>> (111)")
>>
>>
>
>  ,   ,     .    
>  :
> [root  standpm ~]# service mysqls status
> service: mysqls: Unrecognized service
> [root  standpm ~]# service mysqld status
> mysqld is dead, but subsystem is locked
> [root  standpm ~]# service mysqld restart
> Sending TERM signal to mysqld: Service mysqld is not running.
>
>                [PASSED]
> Waiting, while mysqld actualy stopped:
>
>                [ DONE ]
> Adjusting environment for mysqld:
>
>                [ DONE ]
> Starting mysqld service:
>
>                [ DONE ]
> [root  standpm ~]# service mysqld restart
> Sending TERM signal to mysqld: Service mysqld is not running.
>
>                [PASSED]
> Waiting, while mysqld actualy stopped:
>
>                [ DONE ]
> Adjusting environment for mysqld:
>
>                [ DONE ]
> Starting mysqld service:
>
>                [ DONE ]
> [root  standpm ~]# tail /var/log/mysql/info
> info  info.1 info.2 info.3 info.4
>
> [root  standpm ~]# tail /var/log/mysql/info
> 101101 16:19:58 [ERROR] /usr/sbin/mysqld: Can't create file
> '/mysqld.pid' (errno: 13)
> 101101 16:19:58 [ERROR] Can't start server: can't create PID file:
> Permission denied
> 2010-Nov-01 16:19:58 :: execution failed
> 2010-Nov-01 16:19:58 :: shutdown
> 2010-Nov-01 16:21:08 :: startup
> 101101 16:21:08 InnoDB: Started; log sequence number 0 43655
> 101101 16:21:08 [ERROR] /usr/sbin/mysqld: Can't create file
> '/mysqld.pid' (errno: 13)
> 101101 16:21:08 [ERROR] Can't start server: can't create PID file:
> Permission denied
> 2010-Nov-01 16:21:08 :: execution failed
> 2010-Nov-01 16:21:08 :: shutdown
>
>  .
>
>

  :
[sin  inf etersoft-build-utils]$ sudo ls -l /var/lib/mysql/ -d
drwxrws--t 9 root mysql 4096   1 15:28 /var/lib/mysql/

  :
[root  standpm ~]# ls /var/lib/mysql/ -ld
drwxr-xr-x 11 root root 4096 Nov  1 16:33 /var/lib/mysql/

-, - ,  ...
[root  standpm ~]# chmod 3770 /var/lib/mysql/
[root  standpm ~]# chown :mysql /var/lib/mysql/
[root  standpm ~]# service mysqld start
Adjusting environment for mysqld:

                                [ DONE ]
Starting mysqld service:

                                [ DONE ]
[root  standpm ~]# service mysqld status
mysqld is running


-- 
Sin (Sinelnikov Evgeny)


Devel