安裝mysql數據庫時,如果是重新安裝,有時會遇見apply security setting error(access denied for user 'root@localhost'(using password: YES)),即在配置mysql啓動服務時,在啓動apply security setting時會出錯,原因是卸載mysql時並沒有完全刪除文件,所以有必要手動清除這些,要清除的文件主要有:
(XP)
一、mysql的安裝目錄,一般爲C:/Program Files目錄下。
二、mysql的數據存放目錄,一般在C:/Documents and Settings/All Users/Application Data目錄下(需要注意Application Data這個文件夾默認是隱藏的,要通過 工具->文件夾選項->查看->顯示所有文件與文件夾 來設置隱藏文件可見)。
三、刪除註冊表數據,通過regedit,刪除以下幾個文件:
HKEY_LOCAL_MACHINE/SYSTEM/ControlSet002/Services/Eventlog/Application/MySQL
HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/Eventlog/Application/MySQL