標籤:mysql
問題一:#mysql
ERROR 1045 :Access denied for user ‘root‘@‘localhost‘ (using password:NO)
問題原因:初始化問題
解決方案:刪除data目錄重建,重新初始化。
問題二:
當各位在安裝、重裝時出現could not start the service mysql error:0
原因: 卸載mysql時並沒有完全刪除相關檔案和服務,需要手動清除
問題三:
make[2]: *** No rule to make target `/usr/lib/libcurses.so‘, needed by `bin/ccmake‘. Stop.
make[1]: *** [Source/CMakeFiles/ccmake.dir/all] Error 2
make: *** [all] Error 2
解決:cp /usr/lib64/libcurses* /usr/lib
問題四:沒有mysql使用者和組.
mysql伺服器處理序是一般是以非root使用者運行,為了安全起見盡量不使用root使用者來運行.
[[email protected] bin]# ./mysqld_safe --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data
140704 16:10:10 mysqld_safe Logging to ‘/usr/local/mysql/data/db135.err‘.
chown: “mysql”: 無效的使用者
啟動mysql伺服器處理序,沒有指定使用者,伺服器處理序會以mysql使用者來運行,如果沒有該使用者則報錯.
問題五:
[[email protected] mysql]# ./scripts/mysql_install_db --user=mysql
Installing MySQL system tables...
140704 16:13:37 [ERROR] ./bin/mysqld: Can‘t find file: ‘./mysql/db.frm‘ (errno: 13)
ERROR: 1017 Can‘t find file: ‘./mysql/db.frm‘ (errno: 13)
140704 16:13:37 [ERROR] Aborting
140704 16:13:37 [Note] ./bin/mysqld: Shutdown complete
Installation of system tables failed! Examine the logs in
./data for more information.
原因:許可權錯誤.在安裝之前需要更改安裝目標所有者和組為mysql,否則在初始化指令碼執行進報錯.
解決:chown -R mysql.mysql /appli
cation/mysql/
MySQL安裝常見錯誤整理