mysql 잘되다가 갑자기 소켓에러(2)라고해서 데몬죽이구 리붓했

holysds의 이미지

[root@localhost named]# ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.4 0.0 1368 472 ? S 1050 003 init
root 2 0.0 0.0 0 0 ? SW 1050 000 [keventd]
root 3 0.0 0.0 0 0 ? SWN 1050 000 [ksoftirqd_CPU0]
root 8 0.0 0.0 0 0 ? SW 1050 000 [bdflush]
root 4 0.0 0.0 0 0 ? SW 1050 000 [kswapd]
root 5 0.0 0.0 0 0 ? SW 1050 000 [kscand/DMA]
root 6 0.0 0.0 0 0 ? SW 1050 000 [kscand/Normal]
root 7 0.0 0.0 0 0 ? SW 1050 000 [kscand/HighMem]
root 9 0.0 0.0 0 0 ? SW 1050 000 [kupdated]
root 10 0.0 0.0 0 0 ? SW 1050 000 [mdrecoveryd]
root 16 0.0 0.0 0 0 ? SW 1050 000 [scsi_eh_0]
root 17 0.0 0.0 0 0 ? SW 1050 000 [scsi_eh_1]
root 20 0.0 0.0 0 0 ? SW 1050 000 [kjournald]
root 78 0.0 0.0 0 0 ? SW 1050 000 [khubd]
root 1056 0.0 0.0 0 0 ? SW 1050 000 [kjournald]
root 1467 0.0 0.1 1440 544 ? S 1051 000 syslogd -m 0
root 1471 0.0 0.0 1368 428 ? S 1051 000 klogd -x
rpc 1489 0.0 0.1 1540 540 ? S 1051 000 [portmap]
rpcuser 1508 0.0 0.1 1528 692 ? S 1051 000 [rpc.statd]
root 1590 0.0 0.2 3504 1500 ? S 1051 000 /usr/sbin/sshd
root 1604 0.0 0.1 2112 928 ? S 1051 000 xinetd -stayalive -reuse -pidfile /var/run/xinetd.pid
root 1630 0.0 0.4 5916 2492 ? S 1051 000 [sendmail]
smmsp 1639 0.0 0.4 5712 2252 ? S 1051 000 [sendmail]
root 1649 0.0 0.0 1404 436 ? S 1051 000 gpm -t ps/2 -m /dev/mouse
root 1658 0.0 0.1 1416 568 ? S 1051 000 crond
root 1669 0.0 0.3 7488 1856 ? S 1051 000 cupsd
xfs 1729 0.0 0.6 4524 3096 ? S 1051 000 [xfs]
root 1746 0.0 0.2 4196 1180 ? S 1051 000 /bin/sh /usr/local/mysql/bin/mysqld_safe --language=korean
mysql 1763 0.0 2.4 89420 12468 ? S 1051 000 [mysqld]
root 1765 0.0 0.5 6292 2684 ? S 1051 000 /home/httpd/bin/httpd
nobody 1787 0.0 0.5 6472 3004 ? S 1051 000 [libhttpd.ep]
nobody 1788 0.0 0.5 6444 2872 ? S 1051 000 [libhttpd.ep]
nobody 1792 0.0 0.5 6308 2672 ? S 1051 000 [libhttpd.ep]
nobody 1793 0.0 0.5 6308 2672 ? S 1051 000 [libhttpd.ep]
nobody 1794 0.0 0.5 6308 2672 ? S 1051 000 [libhttpd.ep]
root 1827 0.0 0.0 1352 400 tty1 S 1051 000 /sbin/mingetty tty1
root 1828 0.0 0.0 1352 400 tty2 S 1051 000 /sbin/mingetty tty2
root 1829 0.0 0.0 1352 400 tty3 S 1051 000 /sbin/mingetty tty3
root 1830 0.0 0.0 1352 400 tty4 S 1051 000 /sbin/mingetty tty4
root 1831 0.0 0.0 1352 400 tty5 S 1051 000 /sbin/mingetty tty5
root 1835 0.0 0.0 1352 400 tty6 S 1051 000 /sbin/mingetty tty6
root 1859 0.0 0.3 6744 1960 ? S 1051 000 /usr/sbin/sshd
javano 1861 0.0 0.4 6780 2180 ? S 1051 000 [sshd]
javano 1862 0.0 0.2 4288 1364 pts/0 S 1051 000 -bash
nobody 1894 0.0 0.5 6308 2696 ? S 1051 000 [libhttpd.ep]
root 1896 0.0 0.1 4092 924 pts/0 S 1051 000 [su]
root 1897 0.0 0.2 4352 1460 pts/0 S 1051 000 -bash
root 1941 0.0 0.1 3700 568 pts/0 T 1053 000 tail -f messages
root 1942 0.0 0.3 6744 1960 ? S 1053 000 /usr/sbin/sshd
javano 1944 0.0 0.4 6780 2180 ? S 1054 000 [sshd]
javano 1945 0.0 0.2 4292 1368 pts/1 S 1054 000 -bash
root 1979 0.0 0.1 4088 924 pts/1 S 1055 000 [su]
root 1980 0.0 0.2 4348 1420 pts/1 S 1055 000 -bash
named 2041 0.0 0.5 29608 2628 ? S 1055 000 [named]
root 2054 0.0 0.1 3700 568 pts/0 T 1057 000 tail -f mysqld.log
root 2056 0.0 0.1 3700 568 pts/0 T 1058 000 tail -f mysqld.log
root 2083 0.0 0.1 2636 688 pts/0 R 1105 000 ps aux
[4] Exit 127 /usr/local/mysql/bin/safe_mysqld --user=mysql
[root@localhost named]# tail -f mysqld.log
tail mysqld.log No such file or directory
tail no files remaining
[root@localhost named]# cd /var/log
[root@localhost log]# tail -f mysqld.log
040421 13328 Can't start server Bind on unix socket Permission denied
040421 13328 Do you already have another mysqld server running on socket /var/lib/mysql/mysql.sock ?
040421 13328 Aborting

040421 13328 /usr/local/mysql/libexec/mysqld Shutdown 이 완료됨!

040421 013328 mysqld ended

040421 013328 mysqld ended


[4]+ Stopped tail -f mysqld.log
[root@localhost log]# mysqladmin -u root -p start
Enter password
mysqladmin connect to server at 'localhost' failed
error 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)'
Check that mysqld is running and that the socket '/tmp/mysql.sock' exists!
[root@localhost log]# mysql -u root
ERROR 2002 Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
[root@localhost log]# mysql -u root -p
Enter password
ERROR 2002 Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

codebank의 이미지

접속이 안되는 이유는 mysqld이 실행중이지 않기 때문입니다.
mysqld이 실행중이지 않은 이유는 다른 프로그램(또는 동일 mysqld)이 mysqld이
사용할 소켓을 사용하고 있기 때문이죠.
일단 ps -ef해서 mysql에 관련된 프로세서가 있는지 확인하고 만일 있다면 kill로
그 프로세서를 실행취소시키세요.
다음은 /var/lib/mysql 디렉토리로 이동해서 mysql.sock파일이 있는지 확인하고
만일 있다면 mysql.sock파일을 지워버리세요.
시스템을 다시 실행하시거나 mysqld을 다시 실행시키세요.
동일한 문제가 발생한다면 mysql설치가 잘못된것인지 /var/log디렉토리의 message파일이나
/var/log/mysql디렉토리안의 파일들의 내용을 점검해보세요.

------------------------------
좋은 하루 되세요.

holysds의 이미지

^^^^

holysds의 이미지

제가 첨에 rpm으로 깔았다가 지우고...소스로 다시설치한거거덩요

/usr/local/mysql인지

/var/lib/mysql인지 모르겠어요...둘다 봤는데 소켓은 업어요...ㅠㅠ

댓글 달기

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
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.