makeを使用する以外に、カスタム設定でMySQLをインストールする他の方法はありますか?

makeを使用する以外に、カスタム設定でMySQLをインストールする他の方法はありますか?

ゲーム全体のソースコードをダウンロードし、CentOS 7にWebサーバーを構築する予定です。しかし、多くのライブラリが必要で、必要なステップの1つは、カスタム設定を使用してカスタムディレクトリにMySQLをインストールすることです。

インストールする項目のリストは次のとおりです。

  1. ncurses-5.9.tar.gz
  2. libedit-20141030-3.1.tar.gz
  3. cmake-2.8.10.2.tar.gz
  4. mysql-5.6.21.tar.gz

mysql自体の場合は、sql-common/client.c解凍してから1911行を修正し、mysql-5.6.21.tar.gz次のコードを追加する必要があります。

const char *cli_read_statistics(MYSQL *mysql);
int cli_unbuffered_fetch(MYSQL *mysql, char **row);
int cli_stmt_execute(MYSQL_STMT *stmt);
int cli_read_binary_rows(MYSQL_STMT *stmt);
my_bool cli_read_prepare_result(MYSQL *mysql, MYSQL_STMT *stmt);
MYSQL_FIELD *cli_list_fields(MYSQL *mysql);

cmakeその後、次のようにコンパイルする必要があります。

cmake -DCMAKE_INSTALL_PREFIX=/data/local/tool/mysql-5.6.21 \
-DMYSQL_DATADIR=/data/local/tool/mysql-5.6.21/mysql_data \
-DSYSCONFDIR=/data/local/tool/mysql-5.6.21/mysql_etc -DEXTRA_CHARSETS=all \
-DDEFAULT_CHARSET=utf8mb4 \
-DDEFAULT_COLLATION=utf8mb4_unicode_ci \
-DWITH_INNOBASE_STORAGE_ENGINE=1 \
-DWITH_ARCHIVE_STORAGE_ENGINE=1 \
-DWITH_BLACKHOLE_STORAGE_ENGINE=1 \
-DWITH_FEDERATED_STORAGE_ENGINE=1 \
-DWITH_PARTITION_STORAGE_ENGINE=1 \
-DWITH_PERFSCHEMA_STORAGE_ENGINE=1 \
-DMYSQL_UNIX_ADDR=/tmp/mysqld.sock \
-DMYSQL_TCP_PORT=3360 -DWITH_DEBUG=0 \
-DENABLED_LOCAL_INFILE=1 \
-DEDITLINE_INCLUDE_DIR=/data/local/libs/libedit-20141029-3.1/include/editline  \
-DEDITLINE_LIBRARY=/data/local/libs/libedit-20141029-3.1/lib/libedit.so \
-DWITH_EDITLINE=system && make && make install

実行するまではすべて正常ですが、./scripts/mysql_install_db --defaults-file=./my.cnf --user=mysql次のエラーが発生します。

nstalling MySQL system tables...2024-04-13 10:26:57 0 [Warning] Using unique option prefix character-set-client instead of character-set-client-handshake is deprecated and will be removed in a future release. Please use the full name instead. 
2024-04-13 10:26:57 0 [Warning] ./bin/mysqld: ignoring option '--character-set-client-handshake' due to invalid value 'utf8mb4' 
2024-04-13 10:26:57 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 
2024-04-13 10:26:57 12733 [Note] InnoDB: Using atomics to ref count buffer pool pages 
2024-04-13 10:26:57 12733 [Note] InnoDB: The InnoDB memory heap is disabled 
2024-04-13 10:26:57 12733 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 
2024-04-13 10:26:57 12733 [Note] InnoDB: Memory barrier is not used 
2024-04-13 10:26:57 12733 [Note] InnoDB: Compressed tables use zlib 1.2.3 
2024-04-13 10:26:57 12733 [Note] InnoDB: Using CPU crc32 instructions 
2024-04-13 10:26:57 12733 [Note] InnoDB: Initializing buffer pool, size = 128.0M 
2024-04-13 10:26:57 12733 [Note] InnoDB: Completed initialization of buffer pool 
2024-04-13 10:26:57 12733 [Note] InnoDB: Highest supported file format is Barracuda. 
2024-04-13 10:26:57 12733 [Note] InnoDB: 128 rollback segment(s) are active. 
2024-04-13 10:26:57 12733 [Note] InnoDB: Waiting for purge to start 
2024-04-13 10:26:57 12733 [Note] InnoDB: 5.6.21 started; log sequence number 1600637 
ERROR: 1  Can't create/write to file '/data/local/tool/mysql-5.6.21/mysql_data/mysql/db.MYI' (Errcode: 13 - Permission denied) 
2024-04-13 10:26:57 12733 [ERROR] Aborting 
2024-04-13 10:26:57 12733 [Note] Binlog end 
2024-04-13 10:26:57 12733 [Note] InnoDB: FTS optimize thread exiting. 
2024-04-13 10:26:57 12733 [Note] InnoDB: Starting shutdown... 
2024-04-13 10:26:58 12733 [Note] InnoDB: Shutdown completed; log sequence number 1600647 
2024-04-13 10:26:58 12733 [Note] ./bin/mysqld: Shutdown complete

所有者/data/local/tool/mysql-5.6.21/mysql_datamysql

上記の設定を使用してmysqlをインストールする他の代替方法はありますか?それともmysqlをインストールしyumて何かを修正して上記の設定を複製できますか?

ベストアンサー1

おすすめ記事