[問題] MySQL啟動的問題

看板Linux作者時間15年前 (2010/07/10 22:20), 編輯推噓0(003)
留言3則, 3人參與, 最新討論串1/1
看著鳥哥的網站 剛剛想說架設Apache + MySQL + PHP 目前 Apache + PHP 算是完成了 現在剩下MySQL 鳥哥版的是這樣 [root@linux ~]# /etc/init.d/mysqld start # 如果是初次使用這個指令來啟動,你的 /var/lib/mysql 會建立資料庫。 [root@linux ~]# netstat -tuln | grep ':3306' tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN # 底下在測試看能否以手動的方式連上 MySQL 資料庫! [root@linux ~]# mysql -u root Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 to server version: 4.1.20 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> quit Bye 但我的版本是這樣 [root@localhost ~]# /etc/init.d/mysql start bash: /etc/init.d/mysql: 沒有此一檔案或目錄 [root@localhost ~]# netstat -tuln | grep ':3306' [root@localhost ~]# mysql -u root ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var /lib/mysql/mysql.sock' (2) [root@localhost ~]# quit bash: quit: command not found 首先我說一下 /var/lib/mysql 這個目錄,裡面其實沒有任何資料的啦 是我要在那目錄裡面擺資料嗎 還是說一點關係都沒有 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 219.86.170.117

07/10 22:32, , 1F
應該要用/etc/init.d/mysqld start,你的mysqld沒起來啊
07/10 22:32, 1F

07/11 00:30, , 2F
..是你打錯還是你PO上來PO錯了? /mysql"d"
07/11 00:30, 2F

07/11 00:44, , 3F
哈哈~~~~打錯~~~謝謝
07/11 00:44, 3F
文章代碼(AID): #1CE86ddm (Linux)