アリクラウドインストールMysqlヒントCould not find./share/fill_help_tables.sql

1137 ワード

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=インストールディレクトリを追加すると、有効になるはずです.この問題で何時間もやってしまいました...ああ