全文検索:
- 14 MariaDB
- DB | +------------------------+--------+ 1 row in set (0.00 sec) MariaDB [(none)]> show global variabl... N | +-----------------------+-------+ 1 row in set (0.00 sec) MariaDB [(none)]> show global variabl... ---------------------------+----------+ 2 rows in set (0.00 sec) MariaDB [(none)]> show global variabl... +-------------------------+-----------+ 1 row in set (0.00 sec) MariaDB [(none)]> show global variabl
- 15 InnoDB テーブルロック
- | sato | 40 | +----+--------+-----+ 3 rows in set (0.02 sec) </code> <code> create table lock_test... rows affected (0.00 sec) mysql> UPDATE lock_test SET age = 21 WHERE name = 'tanaka'; Query OK, 1 row a... rows affected (0.00 sec) mysql> UPDATE lock_test SET age = 31 WHERE name = 'suzuki'; ERROR 1205 (HY000... | +--------------------------+-------+ 1 row in set (0.02 sec) </code> ===== インデックス張っている方は行ロックとなる ==
- 01 Galera構築
- ertify_nonPK=1 # Maximum number of rows in write set wsrep_max_ws_rows=131072 # Maximum size of write set wsrep_max_ws_size=1073741824 # to enable debug level logging, set this to 1 wsrep_debug=0 # convert locking sessio... # Address on THIS node to receive SST at. DON'T SET IT TO DONOR ADDRESS!!! # (SST method dependent. D
- 09 Galera + innodb_flush_log_at_trx_commit
- AA | | 3690 | AAAA | +------+------+ 3691 rows in set (0.00 sec) -Secondary | 3689 | AAAA | | 3690 | A... AA | | 3691 | AAAA | +------+------+ 3692 rows in set (0.01 sec) </code> == 2.Secondaryのmysqlをkill == ... | | 3891 | AAAA | +-------+------+ 17985 rows in set (0.02 sec) -Secondary | 3881 | AAAA | | 3882 |... A | | 3883 | AAAA | +-------+------+ 17977 rows in set (0.03 sec) </code> {{tag>mysql innodb Galera}}
- 02 MySQL max_connections
- 186 | +----------------------+-------+ 1 row in set (0.01 sec) </code> 現在のコネクション数。 <code console> my... | 63 | +-------------------+-------+ 1 row in set (0.00 sec) </code> ===== エラーログ ===== Apache側で... ===== 対応 (max_connectionsを増やす) ===== <code console> mysql> set global max_connections=450; </code>
- 20 CentOS7 MariDB Galera
- ode|/etc/my.cnf.d/server.cnf> [mariadb] character-set-server=utf8 </code> {{tag>mysql galera mariad
- 51 MySQLベンチマーク(mysqlslap)
- erate-sql-execute-number=# Set this number to generate a set number of queries to run. --auto-generate-sql-gu
- 05 Percona Xtrabackup
- ysql/ </code> 両方のDBを起動後、同期 <code console> mysql> SET GLOBAL wsrep_cluster_address='gcomm://192.168.20.
- 11 Galera同期(複数台構成)
- 2]# /etc/init.d/mysql start [node2]# mysql mysql> set global wsrep_cluster_address='gcomm://192.168.0.1
- 13 mysql56 + galera3
- ster </code> ===== 5.クラスタへ参加 ===== <code> mysql> set global wsrep_cluster_address='gcomm://192.168.10.
- 16 MySQL auto_increment リセット
- E FROM `table_name`; ALTER TABLE `table_name` SET auto_increment = 1; TRUNCATEでも同じ感じになる。 TRUNCA
- 18 CentOS7 MariaDB
- ===== <code> # cat /etc/my.cnf [mysqld] character-set-server=utf8 max_allowed_packet = 32M </code> =