標籤:style http color 使用 os strong 檔案 資料
這兩個在安裝mysql資料庫碰到一些頭疼的很。
"1045 access denied for user ‘root‘@‘localhost‘ using password yes"
在命令列中進入:C:\Program Files\MySQL\MySQL Server 5.5\bin
C:\Program Files\MySQL\MySQL Server 5.1\bin>mysqld --defaults-file="C:\Program Files\MySQL\MySQL Server 5.5\bin\my.ini" --console --skip-grant-tables
090515 22:06:09 [ERROR] The update log is no longer supported by MySQL in versio
n 5.0 and above. It is replaced by the binary log. Now starting MySQL with --log
-bin=‘‘ instead.
090515 22:06:09 InnoDB: Started; log sequence number 0 324221
090515 22:06:09 [Note] mysqld: ready for connections.
Version: ‘5.1.33-community-log‘ socket: ‘‘ port: 3306 MySQL Community Server
(GPL)
看到這個結果就說明MySQL已經起來了。
再開一個DOS視窗,同樣切到mysql bin目錄下,
輸入
mysql> UPDATE user SET Password=PASSWORD(’newpassword’) where USER=’root’;
mysql> FLUSH PRIVILEGES;
mysql> quit
然後
C:\Program Files\MySQL\MySQL Server 5.5\bin>mysqladmin shutdown
之後正常重啟MySQL服務就行了。
配置好最後點擊 Execute 按鈕了,但是進行不到 Start service 這一步。
檢查了下 MySQL 系統服務已添加,但是無法啟動,手工也不行。這時候用事件檢視器可以看到程式事件裡有幾個來自於 MySQL 的錯誤:
Plugin ‘InnoDB‘ registration as a STORAGE ENGINE failed.
Unknown/unsupported table type: INNODB
原來是因為這兩版本的 MySQL 預設使用了支援事物的 INNODB 引擎,開啟 my.ini 檔案,在 MySQL 的安裝資料夾, 如 C:\Program Files\MySQL\MySQL Server 5.5\bin 中,看到:
default-storage-engine=INNODB
解決辦法是把該設定改為
default-storage-engine=MYISAM
如果還是不行則找到:skip-innodb 取消登出,後在服務中手動啟動。
註:主要參考http://bbs.csdn.net/topics/310006640