MYSQL 실행시 에러.. 답변 바래여..

익명 사용자의 이미지

반가워요.
리눅스 커멘드라인에서
MYSQL 하고 엔터치니까
이런 메시지가 뜹니다.

ERROR 2002 can't connect to local MYSQL server through
socket '/tmp/mysql.sock'

이거 왜 이런거죠..??

답변 부탁드립니다.

익명 사용자의 이미지


기억이 확실한지 모르겠습니다.

mysql 데몬이 떠있지 않을경우, 그런 메세지가 뜨는걸로 기억됨.

한번 확인해보시겠어요?

익명 사용자의 이미지

mysql 데몬이 떠있지 않은 상태입니다.

mysql 버젼이 잘 생각이 안나는데 ^^;;

3.23.47부터는 mysql 사용자로 데몬을 띄우시면 되고

그 이전버젼이면 그냥 띄우시면 될꺼에요..

데몬은 설치하신 디렉토리가 /usr/local/mysql이라면

3.23.47 이후 버젼
/usr/local/mysql/bin/safe_mysqld -u mysql &

3.23.47 이전 버젼
/usr/local/mysql/bin/safe_mysqld &

위의 데몬들이 mysql 소켓으 띄운답니다. 위의 메세지도 소켓에러이구
요..

답변이 되었는지 모르겠네요..

그럼 수고하세요..

--
만사 형통 하시길~~

-linux.sarang.net -

추가 부분 - mysql manual -
If you have problems with the fact that anyone can delete the MySQL
communication socket `/tmp/mysql.sock', you can, on most versions of
Unix, protect your `/tmp' file system by setting the sticky bit on
it. Log in as root and do the following

shell> chmod +t /tmp

This will protect your `/tmp' file system so that files can be
deleted only by their owners or the superuser (root).

You can check if the sticky bit is set by executing ls -ld /tmp. If
the last permission bit is t, the bit is set.

You can change the place where MySQL uses / puts the socket file the
following ways

Specify the path in a global or local option file. For example, put
in /etc/my.cnf
[client]
socket=path-for-socket-file

[mysqld]
socket=path-for-socket-file

See section 4.1.2 my.cnf Option Files.
Specifying this on the command line to safe_mysqld and most clients
with the --socket=path-for-socket-file option.
Specify the path to the socket in the MYSQL_UNIX_PORT environment
variable.
Defining the path with the configure option --with-unix-socket-
path=path-for-socket-file. See section 2.3.3 Typical configure
Options.

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.