Search the MySQL manual:
MySQL Manual

Buy this Reference Manual in softcover from Barnes & Noble!

Previous / Next / Up / Table of Contents

A.4.5 Как защитить или изменить сокет-файл MySQL `/tmp/mysql.sock'

Если возникают проблемы с тем, что кто угодно может удалить коммуникационный сокет MySQL `/tmp/mysql.sock', то в большинстве версий Unix можно защитить содержимое `/tmp', установив на каталоге ``липучий'' (sticky) бит. Войдите в систему как пользователь root и выполните следующую команду:

shell> chmod +t /tmp

Это защитит ваш каталог `/tmp': теперь удалять в нем файлы смогут только их владельцы или суперпользователь (root).

Проверить, установлен ли ``липучий'' (sticky) бит, можно, выполнив ls -ld /tmp. Если последним битом прав является t, то бит установлен.

Изменить путь к каталогу, где MySQL открывает сокет-файл, можно, воспользовавшись одним из следующих способов:

Проверить, работает ли сокет, можно следующей командой:

shell> mysqladmin --socket=/path/to/socket version

User Comments

Posted by [name withheld] on Friday June 14 2002, @12:58pm [Delete] [Edit]

My time zone is EDT, and I'm inserting a DateTime
value of "2002-10-27 01:00:00". This datetime
happens to be on the night that we come off of
Daylight savings time, so at 2am the clock goes
back 1 hour and it's 1am again. So 1am occurs
twice during this day and my insert is
ambiguous. Which "1am" will get inserted the
first or the second occurance? Well when I do
the insert, the datetime seems to go in as the
second occurance (6am GMT). How can I insert a
datetime value that refers to the first 1am??
(the one that occurs at 5am GMT)??? Is there any
way to insert and retrieve a datetime using GMT?

Posted by [name withheld] on Wednesday December 18 2002, @5:29pm [Delete] [Edit]

Is there any way to insert and retrieve a
datetime using GMT?You could use
seconds from epoch; i.e. a UNIX timestamp.

Add your own comment.

Top / Previous / Next / Up / Table of Contents