Mysql出現(xiàn)問題:error?while?loading?shared?libraries:?libaio解決方案
問題
初始化數(shù)據(jù)庫時
mysqld --initialize --user mysql

報錯:
mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory
執(zhí)行這行命令報錯了,原因是:新的服務(wù)器環(huán)境,上面很多依賴都沒有,所以安裝軟件的時候遇到一大堆小問題,解決它很簡單,它缺少啥就安裝啥。
解決方案
yum install -y libaio.so.1

又報錯了:
Errors during downloading metadata for repository ‘epel': Status code: 404 for http://archives.fedoraproject.org/pub/archive/epel/8/Everything/x86_64/repodata/repomd.xml (IP: **) Error: Failed to download metadata for repo ‘epel': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
原因是:第三方的鏡像站中均已移除CentOS 8的源,Centos 8版本已停止更新相應(yīng)依賴導(dǎo)致的,下載新的yum源即可搞定。
解決方案:備份之前的repo文件,命令:
mv /etc/yum.repos.d /etc/yum.repos.d.bak
創(chuàng)建源文件目錄,命令:
mkdir -p /etc/yum.repos.d
下載新的yum源
curl https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo > /etc/yum.repos.d/Centos-vault-8.5.2111.repo curl https://mirrors.aliyun.com/repo/epel-archive-8.repo > /etc/yum.repos.d/epel-archive-8.repo
如圖所示操作:

再下載依賴:
yum install -y libaio.so.1


再安裝
yum install -y libaio
提示成功后,初始化數(shù)據(jù)庫:
mysqld --initialize --user mysql

到此這篇關(guān)于Mysql出現(xiàn)問題:error while loading shared libraries: libaio解決方案的文章就介紹到這了,更多相關(guān)error while loading shared libraries: libaio解決方案內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
相關(guān)文章
MySQL之使用UNION和UNION ALL合并兩個或多個SELECT語句的結(jié)果集
這篇文章主要介紹了MySQL之使用UNION和UNION ALL合并兩個或多個SELECT語句的結(jié)果集,具有很好的參考價值,希望對大家有所幫助,如有錯誤或未考慮完全的地方,望不吝賜教2024-04-04
Mysql如何對json數(shù)據(jù)進行查詢及修改
這篇文章主要介紹了Mysql如何對json數(shù)據(jù)進行查詢及修改,具有很好的參考價值,希望對大家有所幫助。如有錯誤或未考慮完全的地方,望不吝賜教2022-07-07
Windows版mysql?8.0.28?安裝配置方法圖文教程
這篇文章主要為大家詳細介紹了Windows版mysql?8.0.28?安裝配置方法圖文教程,文中安裝步驟介紹的非常詳細,具有一定的參考價值,感興趣的小伙伴們可以參考一下2022-06-06
MySQL中聚合函數(shù)count的使用和性能優(yōu)化技巧
這篇文章主要介紹了Windows 10,MySQL版本是5.7.12-log環(huán)境下mysql中聚合函數(shù)count的使用和性能優(yōu)化,需要的朋友可以參考下2018-06-06
Table ‘xxx’ is marked as crashed and should be repaired 錯誤解決
這些東西都是從其他地方找來的一些解決MYSQL數(shù)據(jù)庫這個錯誤的方法,并不一定適用于神跡數(shù)據(jù)庫,僅僅供參考一下,具體的解決方法還是需要摸索。2009-04-04

