進不了網站啊,求教
啟動是如下顯示:
[root@localhost mysql]# Starting mysqld daemon with databases from /usr/local/mysql/data
020405 05:06:42 mysqld ended
數據庫為什麽會 ended 的呢?
再執行這個語句:/usr/local/mysql/bin/mysqld_safe --user=mysql &
顯示如下:
[1] 24154
[root@localhost bin]# The file /usr/local/mysql/libexec/mysqld doesn't exist or is not
executable
Please do a cd to the mysql installation directory and restart
this script from there as follows:
./bin/mysqld_safe.
查看日誌(壹般在mysql/data/下),如下:
020405 09:58:28 mysqld started
Warning: Ignoring user change to 'mysql' because the user was set to 'mysql' earlier on the
command line
020405 9:58:28 Can't start server : Bind on unix socket: Permission denied
020405 9:58:28 Do you already have another mysqld server running on socket:
/usr/local/mysql/mysql.sock ?
020405 9:58:28 Aborting
020405 9:58:28 /usr/local/mysql/bin/mysqld: Shutdown Complete
020405 09:58:28 mysqld ended
020405 11:06:36 mysqld started
Warning: Ignoring user change to 'mysql' because the user was set to 'mysql' earlier on the
command line
020405 11:06:36 Can't start server : Bind on unix socket: Permission denied
020405 11:06:36 Do you already have another mysqld server running on socket:
/usr/local/mysql/mysql.sock ?
020405 11:06:36 Aborting
020405 11:06:36 /usr/local/mysql/bin/mysqld: Shutdown Complete
020405 11:06:36 mysqld ended
@@@@@@@@@@@@@@@@@@@@ 問題遇到轉機: @@@@@@@@@@@@@@@@@@@@
輸入:sudo /usr/local/mysql/bin/safe_mysqld
出現:
Starting mysqld daemon with databases from /usr/local/mysql/data
(命令停止不動,沒有回到命令行下,按ctrl+z結束,出現)
[1]+ Stopped sudo /usr/local/mysql/bin/safe_mysqld
執行
[root@localhost mysql]# ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.0 1368 64 ? S 09:06 0:05 init [3]
root 2 0.0 0.0 0 0 ? SW 09:06 0:00 [keventd]
root 3 0.0 0.0 0 0 ? SW 09:06 0:00 [kapmd]
root 4 0.0 0.0 0 0 ? SWN 09:06 0:00 [ksoftirqd_CPU0]
root 9 0.0 0.0 0 0 ? SW 09:06 0:00 [bdflush]
root 5 0.0 0.0 0 0 ? SW 09:06 0:00 [kswapd]
root 6 0.0 0.0 0 0 ? SW 09:06 0:00 [kscand/DMA]
root 7 0.0 0.0 0 0 ? SW 09:06 0:02 [kscand/Normal]
root 8 0.0 0.0 0 0 ? SW 09:06 0:00 [kscand/HighMem]
root 10 0.0 0.0 0 0 ? SW 09:06 0:00 [kupdated]
root 11 0.0 0.0 0 0 ? SW 09:06 0:00 [mdrecoveryd]
root 17 0.0 0.0 0 0 ? SW 09:06 0:00 [scsi_eh_0]
root 20 0.0 0.0 0 0 ? SW 09:06 0:00 [kjournald]
root 78 0.0 0.0 0 0 ? SW 09:06 0:00 [khubd]
root 2744 0.0 0.0 0 0 ? SW 09:06 0:00 [kjournald]
root 3065 0.0 0.0 1440 68 ? S 09:07 0:00 syslogd -m 0
root 3069 0.0 0.0 1368 20 ? S 09:07 0:00 klogd -x
rpc 3087 0.0 0.0 1548 120 ? S 09:07 0:00 [portmap]
rpcuser 3106 0.0 0.0 1524 164 ? S 09:07 0:00 [rpc.statd]
root 3173 0.0 0.0 1364 68 ? S 09:07 0:00 /usr/sbin/apmd -p 10 -w 5 -W
-P /etc/sysconfig/apm-scripts/apm
root 3210 0.0 0.2 3508 1016 ? S 09:08 0:00 /usr/sbin/sshd
root 3224 0.0 0.0 2028 316 ? S 09:08 0:00 xinetd -stayalive -reuse -
pidfile /var/run/xinetd.pid
root 3285 0.0 0.5 5908 1924 ? S 09:08 0:00 [sendmail]
smmsp 3294 0.0 0.4 5712 1616 ? S 09:08 0:00 [sendmail]
root 3304 0.0 0.0 1412 96 ? S 09:08 0:01 gpm -t ps/2 -m /dev/mouse
root 3313 0.0 0.0 1420 136 ? S 09:08 0:00 crond
root 3324 0.0 0.3 8356 1400 ? S 09:08 0:00 cupsd
xfs 3388 0.0 0.6 4536 2568 ? S 09:08 0:00 [xfs]
daemon 3406 0.0 0.0 1412 180 ? S 09:08 0:00 [atd]
root 3414 0.0 0.0 1348 56 tty1 S 09:08 0:00 /sbin/mingetty tty1
root 3415 0.0 0.0 1348 56 tty2 S 09:08 0:00 /sbin/mingetty tty2
root 3416 0.0 0.0 1348 56 tty3 S 09:08 0:00 /sbin/mingetty tty3
root 3417 0.0 0.0 1348 56 tty4 S 09:08 0:00 /sbin/mingetty tty4
root 3418 0.0 0.0 1348 56 tty5 S 09:08 0:00 /sbin/mingetty tty5
root 3419 0.0 0.0 1348 56 tty6 S 09:08 0:00 /sbin/mingetty tty6
root 8755 0.0 0.5 11304 2268 ? S 10:19 0:00 /usr/local/apache/bin/f和php.ini文件,具體可查找(find / -name 文件)
my.cnf文件壹般在/etc/my.cnf
php.ini壹般在/etc/php.ini
2)確保兩個文件裏的 socket = /tmp/mysql.sock 都相同!!!
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
呵,到此,我看到了 Belltree 的回復!!!
@@@@@@@@@@@@@@@@@@@@(Belltree 原話)@@@@@@@@@@@@@@@@@@@@
妳以root身份登錄,然後
killall -9 mysql
killall -9 mysqld
killall -9 mysqld_safe
然後ps -Af | grep mysql,確定沒有任何mysqld的進程,有就殺掉
cd /usr/local/mysql
./bin/mysqld_safe &
應該可以的
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@ 結尾 @@@@@@@@@@@@@@@@@@@@
壹試果然OK了,呵,現在的心情是無比的痛快真想抱著 Belltree 狂吻!!!!
[root@localhost mysql]# ./bin/mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2 to server version: 4.1.0-alpha-standard
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.