Lamp 安裝 MySQL 遇到的問題匯總

來源:互聯網
上載者:User

標籤:centos   lamp   mysql   

1: 缺少 libaio 包, libaio是Linux下的一個非同步非阻塞方式讀寫檔案的介面。

[[email protected] MySQL]# ./scripts/mysql_install_db --user=mysql --datadir=/data/mysqlInstalling MySQL system tables..../bin/mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory

解決辦法:安裝↓

Solution:yum -y install libaio-devel

2: 缺少 openssl 包

[[email protected] mysql]# ./scripts/mysql_install_db --user=mysqlInstalling MySQL system tables..../bin/mysqld: error while loading shared libraries: libssl.so.6: cannot open shared object file: No such file or directory

解決辦法:先檢查所有所有的 $PATH 目錄是否包含libssl*連結庫,如果有,可以做軟連結改變名字,如果沒有,安裝↓

Solution:yum -y install openssl-devel

[[email protected] mysql]# cd /usr/lib[[email protected] lib]# ls libssl.solibssl.so[[email protected] lib]# ln -s libssl.so libssl.so.6[[email protected] lib]#ln -s libcrypto.so libcrypto.so.6

3:在安裝過程中,檢查設定檔的錯誤

[[email protected] mysql]# ./scripts/mysql_install_db --defaults-file=my_wresp.cnf --user=mysqlInstalling MySQL system tables...131213 17:13:28 [ERROR] WSREP: Query cache is not supported (size=67108864 type=1)131213 17:13:28 [ERROR] Aborting

解決辦法:測試過程中就按照錯誤資訊修改即可,至於原因,事後再行計較。

Solution:刪除所有query cache相關的配置選項

[[email protected] ]# cat /etc/my.cnf | grep queyr_cachequery_cache_size = 64Mquery_cache_limit = 2M

4:與上面相同處理

131213 18:03:21 [ERROR] WSREP: Parallel applying (wsrep_slave_threads > 1) requires innodb_autoinc_lock_mode = 2.131213 18:03:21 [ERROR] Abortingadd in my_wsrep.cnf:innodb_autoinc_lock_mode=2

5:缺少相關的模組

131215 0:15:31 [Note] WSREP: Requesting state transfer: success, donor: 0tar: This does not look like a tar archivetar: Exiting with failure status due to previous errorsWSREP_SST: [ERROR] Error while getting data from donor node: exit codes: 0 2 (20131215 00:15:34.320)WSREP_SST: [ERROR] Cleanup after exit with status:32 (20131215 00:15:34.332)WSREP_SST: [INFO] Removing the sst_in_progress file (20131215 00:15:34.349)131215 0:15:34 [ERROR] WSREP: Process completed with error: wsrep_sst_xtrabackup --role ‘joiner‘ --address ‘192.168.1.46‘ --auth ‘‘ --datadir ‘/usr/local/mysql/var/‘ --defaults-file ‘/etc/my.cnf‘ --parent ‘2714‘: 32 (Broken pipe)131215 0:15:34 [ERROR] WSREP: Failed to read uuid:seqno from joiner script.131215 0:15:34 [ERROR] WSREP: SST failed: 32 (Broken pipe)131215 0:15:34 [ERROR] Aborting

Solution : 

#yum install perl-Time-HiRes#yum -y install perl-DBD-MySQL.x86_64#yum -y install libaio*

6. 連接埠被佔用

WSREP_SST: [INFO] Evaluating socat -u TCP-LISTEN:4444,reuseaddr stdio | tar xfi - --recursive-unlink -h; RC=( ${PIPESTATUS[@]} ) (20140128 15:35:07.478)2014/01/28 15:35:07 socat[10521.3077941584] E bind(11, {AF=2 0.0.0.0:4444}, 16): Address already in usetar: This does not look like a tar archivetar: Exiting with failure status due to previous errors

解決辦法,找到佔用連接埠的程式,殺掉(比較暴力,也可以換連接埠,但是初次安裝為簡單起見,暴力)

Solution:

[[email protected] ~]# lsof -i :4444  lsof: no pwd entry for UID 503  COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME  lsof: no pwd entry for UID 503  socat 5256 503 11u IPv4 13450 0t0 TCP *:krb524 (LISTEN)  [[email protected] ~]# kill -9 5256  [[email protected] ~]# lsof -i :4444  [[email protected] ~]# lsof -i :4444


本文出自 “老七Linux營運管理” 部落格,請務必保留此出處http://asd9577.blog.51cto.com/4291946/1937107

Lamp 安裝 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.