

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# mysql 属性
<a name="attributes-recipes-mysql"></a>

**重要**  
この AWS OpsWorks Stacks サービスは 2024 年 5 月 26 日にサポート終了となり、新規および既存のお客様の両方で無効になっています。できるだけ早くワークロードを他のソリューションに移行することを強くお勧めします。移行についてご質問がある場合は、[AWS re:Post](https://repost.aws/) または[AWS プレミアムサポート](https://aws.amazon.com/support)を通じて AWS サポート チームにお問い合わせください。

**注記**  
これらの属性は Linux スタックにのみ使用できます。

[`mysql` 属性](https://github.com/aws/opsworks-cookbooks/blob/release-chef-11.10/mysql/attributes/server.rb)は [MySQL](http://www.mysql.com/) マスター設定を指定します。詳細については、「[サーバーシステム変数](http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html)」を参照してください。組み込み属性を上書きしてカスタム値を指定する方法の詳細については、「[属性の上書き](workingcookbook-attributes.md)」を参照してください。


****  

|  |  |  | 
| --- |--- |--- |
| [basedir ](#attributes-recipes-mysql-basedir) | [bind\$1address ](#attributes-recipes-mysql-bind) | [クライアント ](#attributes-recipes-mysql-clients) | 
| [conf\$1dir ](#attributes-recipes-mysql-conf) | [confd\$1dir ](#attributes-recipes-mysql-confd) | [datadir ](#attributes-recipes-mysql-datadir) | 
| [grants\$1path ](#attributes-recipes-mysql-grants) | [mysql\$1bin ](#attributes-recipes-mysql-bin) | [mysqladmin\$1bin ](#attributes-recipes-mysql-admin-bin) | 
| [pid\$1file ](#attributes-recipes-mysql-pid) | [port ](#attributes-recipes-mysql-port) | [root\$1group ](#attributes-recipes-mysql-group) | 
| [server\$1root\$1password ](#attributes-recipes-mysql-pwd) | [ソケット ](#attributes-recipes-mysql-socket) | [tunable 属性](#attributes-recipes-mysql-tunable) | 

**basedir **  <a name="attributes-recipes-mysql-basedir"></a>
ベースディレクトリ (文字列)。デフォルト値は `'/usr'` です。  

```
node[:mysql][:basedir]
```

**bind\$1address **  <a name="attributes-recipes-mysql-bind"></a>
MySQL がリッスンするアドレス (文字列)。デフォルト値は `'0.0.0.0'` です。  

```
node[:mysql][:bind_address]
```

**クライアント **  <a name="attributes-recipes-mysql-clients"></a>
クライアントのリスト (文字列のリスト)。  

```
node[:mysql][:clients]
```

**conf\$1dir **  <a name="attributes-recipes-mysql-conf"></a>
設定ファイルを含むディレクトリ (文字列)。デフォルト値は次のとおりです。  
+ Amazon Linux および RHEL: `'/etc'`
+ Ubuntu: `'/etc/mysql'`

```
node[:mysql][:conf_dir]
```

**confd\$1dir **  <a name="attributes-recipes-mysql-confd"></a>
追加の設定ファイルを含むディレクトリ (文字列)。デフォルト値は `'/etc/mysql/conf.d'` です。  

```
node[:mysql][:confd_dir]
```

**datadir **  <a name="attributes-recipes-mysql-datadir"></a>
データディレクトリ (文字列)。デフォルト値は `'/var/lib/mysql'` です。  

```
node[:mysql][:datadir]
```

**grants\$1path **  <a name="attributes-recipes-mysql-grants"></a>
許可のテーブルの場所 (文字列)。デフォルト値は `'/etc/mysql_grants.sql'` です。  

```
node[:mysql][:grants_path]
```

**mysql\$1bin **  <a name="attributes-recipes-mysql-bin"></a>
mysql バイナリの場所 (文字列)。デフォルト値は `'/usr/bin/mysql'` です。  

```
node[:mysql][:mysql_bin]
```

**mysqladmin\$1bin **  <a name="attributes-recipes-mysql-admin-bin"></a>
mysqladmin の場所 (文字列)。デフォルト値は `'/usr/bin/mysqladmin'` です。  

```
node[:mysql][:mysqladmin_bin]
```

**pid\$1file **  <a name="attributes-recipes-mysql-pid"></a>
デーモンのプロセス ID を含むファイル (文字列)。デフォルト値は `'/var/run/mysqld/mysqld.pid'` です。  

```
node[:mysql][:pid_file]
```

**port **  <a name="attributes-recipes-mysql-port"></a>
サーバーがリッスンするポート (数値)。デフォルト値は `3306` です。  

```
node[:mysql][:port]
```

**root\$1group **  <a name="attributes-recipes-mysql-group"></a>
ルートグループ (文字列)。デフォルト値は `'root'` です。  

```
node[:mysql][:root_group]
```

**server\$1root\$1password **  <a name="attributes-recipes-mysql-pwd"></a>
サーバーのルートパスワード (文字列)。デフォルト値はランダムに生成されます。  

```
node[:mysql][:server_root_password]
```

**ソケット **  <a name="attributes-recipes-mysql-socket"></a>
ソケットファイルの場所 (文字列)。デフォルト値は `'/var/lib/mysql/mysql.sock'` です。デフォルト値は次のとおりです。  
+ Amazon Linux および RHEL: `'/var/lib/mysql/mysql.sock'`
+ Ubuntu: `'/var/run/mysqld/mysqld.sock'`

```
node[:mysql][:socket]
```

**tunable 属性**  <a name="attributes-recipes-mysql-tunable"></a>
調整可能な属性はパフォーマンス調整に使用されます。    
****    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/opsworks/latest/userguide/attributes-recipes-mysql.html)  
**back\$1log **  <a name="attributes-recipes-mysql-tunable-back"></a>
未処理のリクエストの最大数 (文字列)。デフォルト値は `'128'` です。  

```
node[:mysql][:tunable][:back_log]
```  
**innodb\$1additional\$1mem\$1pool\$1size **  <a name="attributes-recipes-mysql-tunable-mem"></a>
[Innodb](http://dev.mysql.com/doc/refman/5.5/en/innodb-storage-engine.html) が内部データ構造を保存するために使用するプールのサイズ (文字列)。デフォルト値は `'20M'` です。  

```
node[:mysql][:tunable][:innodb_additional_mem_pool_size]
```  
**innodb\$1buffer\$1pool\$1size **  <a name="attributes-recipes-mysql-tunable-buffer"></a>
[Innodb](http://dev.mysql.com/doc/refman/5.5/en/innodb-storage-engine.html) バッファープールサイズ (文字列)。属性値は OpsWorks スタックによって設定され、インスタンスタイプによって異なりますが、カスタム JSON またはカスタム属性ファイルを使用して[上書き](workingcookbook-attributes.md)できます。  

```
node[:mysql][:tunable][:innodb_buffer_pool_size]
```  
**innodb\$1flush\$1log\$1at\$1trx\$1commit **  <a name="attributes-recipes-mysql-tunable-flush"></a>
[Innodb](http://dev.mysql.com/doc/refman/5.5/en/innodb-storage-engine.html) がログバッファーをフラッシュする頻度 (文字列)。デフォルト値は `'2'` です。詳細については、「[innodb\$1flush\$1log\$1at\$1trx\$1commit](http://dev.mysql.com/doc/refman/5.1/en/innodb-parameters.html#sysvar_innodb_flush_log_at_trx_commit)」を参照してください。  

```
node[:mysql][:tunable][:innodb_flush_log_at_trx_commit]
```  
**innodb\$1lock\$1wait\$1timeout **  <a name="attributes-recipes-mysql-tunable-lock"></a>
[Innodb](http://dev.mysql.com/doc/refman/5.5/en/innodb-storage-engine.html) トランザクションが行ロックを待機する最大時間 (秒数) (文字列)。デフォルト値は `'50'` です。  

```
node[:mysql][:tunable][:innodb_lock_wait_timeout]
```  
**key\$1buffer **  <a name="attributes-recipes-mysql-tunable-key"></a>
インデックスバッファーサイズ (文字列)。デフォルト値は `'250M'` です。  

```
node[:mysql][:tunable][:key_buffer]
```  
**log\$1slow\$1queries **  <a name="attributes-recipes-mysql-tunable-slow"></a>
スロークエリのログファイルの場所 (文字列)。デフォルト値は `'/var/log/mysql/mysql-slow.log'` です。  

```
node[:mysql][:tunable][:log_slow_queries]
```  
**long\$1query\$1time **  <a name="attributes-recipes-mysql-tunable-long"></a>
クエリを長いクエリとして指定するための時間 (秒) (文字列)。デフォルト値は `'1'` です。  

```
node[:mysql][:tunable][:long_query_time]
```  
**max\$1allowed\$1packet **  <a name="attributes-recipes-mysql-tunable-packet"></a>
許容される最大パケットサイズ (文字列)。デフォルト値は `'32M'` です。  

```
node[:mysql][:tunable][:max_allowed_packet]
```  
**max\$1connections **  <a name="attributes-recipes-mysql-tunable-connections"></a>
同時クライアント接続の最大数 (文字列)。デフォルト値は `'2048'` です。  

```
node[:mysql][:tunable][:max_connections]
```  
**max\$1heap\$1table\$1size **  <a name="attributes-recipes-mysql-tunable-heap"></a>
ユーザーが作成した `MEMORY` テーブルの最大サイズ (文字列)。デフォルト値は `'32M'` です。  

```
node[:mysql][:tunable][:max_heap_table_size]
```  
**net\$1read\$1timeout **  <a name="attributes-recipes-mysql-tunable-net-read"></a>
接続からの追加のデータを待機する時間 (秒) (文字列) デフォルト値は `'30'` です。  

```
node[:mysql][:tunable][:net_read_timeout]
```  
**net\$1write\$1timeout **  <a name="attributes-recipes-mysql-tunable-net-write"></a>
接続に書き込まれるブロックを待機する時間 (秒) (文字列)。デフォルト値は `'30'` です。  

```
node[:mysql][:tunable][:net_write_timeout]
```  
**query\$1cache\$1limit **  <a name="attributes-recipes-mysql-tunable-cache-limit"></a>
キャッシュした各クエリの最大サイズ (文字列)。デフォルト値は `'2M'` です。  

```
node[:mysql][:tunable][:query_cache_limit]
```  
**query\$1cache\$1size **  <a name="attributes-recipes-mysql-tunable-cache-size"></a>
クエリのキャッシュのサイズ (文字列)。デフォルト値は `'128M'` です。  

```
node[:mysql][:tunable][:query_cache_size]
```  
**query\$1cache\$1type **  <a name="attributes-recipes-mysql-tunable-cache-type"></a>
クエリのキャッシュのタイプ (文字列)。指定できる値は次のとおりです。  
+ `'0'`: キャッシュなし、またはキャッシュしたデータの取得なし。
+ `'1'`: `SELECT SQL_NO_CACHE` で開始されないキャッシュのステートメント。
+ `'2'`: `SELECT SQL_CACHE` で開始されるキャッシュのステートメント。
デフォルト値は `'1'` です。  

```
node[:mysql][:tunable][:query_cache_type]
```  
**thread\$1cache\$1size **  <a name="attributes-recipes-mysql-tunable-thread-cache"></a>
再利用のためにキャッシュされるクライアントのスレッドの数 (文字列)。デフォルト値は `'8'` です。  

```
node[:mysql][:tunable][:thread_cache_size]
```  
**thread\$1stack **  <a name="attributes-recipes-mysql-tunable-thread-stack"></a>
各スレッドのスタックのサイズ (文字列)。デフォルト値は `'192K'` です。  

```
node[:mysql][:tunable][:thread_stack]
```  
**wait\$1timeout **  <a name="attributes-recipes-mysql-tunable-wait"></a>
非対話形式の接続で待機する時間 (秒)。デフォルト値は `'180'` です (文字列)。  

```
node[:mysql][:tunable][:wait_timeout]
```  
**table\$1cache **  <a name="attributes-recipes-mysql-tunable-table"></a>
開いたテーブルの数 (文字列)。デフォルト値は `'2048'` です。  

```
node[:mysql][:tunable][:table_cache]
```