阿里云安裝Mysql提示Could not find ./share/fill_help_tables.sql

source方式安裝mysql的時(shí)候,出現(xiàn)了Could not find ./share/fill_help_tables.sql的問題:

# /usr/local/mysql/scripts/mysql_install_db --root=mysql basedir=/usr/local/mysql/  --datadir=/mnt/data/
FATAL ERROR: Could not find ./share/fill_help_tables.sql

If you compiled from source, you need to run 'make install' to
copy the software into the correct location ready for operation.

If you are using a binary release, you must either be at the top
level of the extracted archive, or pass the --basedir option
pointing to that location.

我反復(fù)試了好幾遍,發(fā)現(xiàn)都不行。google去看了下,別人是手動(dòng)把*.sql復(fù)制到/share/目錄下的。
想了好久才意識(shí)到,是執(zhí)行命令的不對(duì)啊。。。
所以這應(yīng)該是阿里云的文檔有個(gè)小錯(cuò)誤吧。
按照阿里云的步驟
(https://help.aliyun.com/document_detail/50700.html?spm=5176.doc53077.6.712.dJ7ieO),安裝mysql時(shí) 第6步初始化數(shù)據(jù)庫(kù),是cd到/usr/local/src/mysql-5.6.24/目錄下,然后再去執(zhí)行 “/usr/local/mysql/scripts/mysql_install_db --user=mysql --datadir=/mnt/data/ ”命令。
但是實(shí)際上這是不對(duì)的,應(yīng)該是在mysql的安裝目錄下去執(zhí)行命令,也就是要cd到/usr/local/mysql/下,然后再去執(zhí)行初始化的命令。
當(dāng)然了,這可能跟版本有關(guān)系。
此外,若是你加上basedir=安裝目錄,應(yīng)該也有效;
就這問題弄了幾個(gè)小時(shí)了。。。唉

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容