MySQL安裝常見錯誤整理

來源:互聯網
上載者:User

標籤: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安裝常見錯誤整理

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.