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

source方式安装mysql的时候,出现了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.

我反复试了好几遍,发现都不行。google去看了下,别人是手动把*.sql复制到/share/目录下的。
想了好久才意识到,是执行命令的不对啊。。。
所以这应该是阿里云的文档有个小错误吧。
按照阿里云的步骤
(https://help.aliyun.com/document_detail/50700.html?spm=5176.doc53077.6.712.dJ7ieO),安装mysql时 第6步初始化数据库,是cd到/usr/local/src/mysql-5.6.24/目录下,然后再去执行 “/usr/local/mysql/scripts/mysql_install_db --user=mysql --datadir=/mnt/data/ ”命令。
但是实际上这是不对的,应该是在mysql的安装目录下去执行命令,也就是要cd到/usr/local/mysql/下,然后再去执行初始化的命令。
当然了,这可能跟版本有关系。
此外,若是你加上basedir=安装目录,应该也有效;
就这问题弄了几个小时了。。。唉

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容