|
|
|
|
|
|
|
|
user: root |
|
|
user: root |
|
|
password: pass |
|
|
password: pass |
|
|
|
|
|
|
|
|
|
|
|
InnoDB parameters |
|
|
|
|
|
================= |
|
|
|
|
|
|
|
|
|
|
|
- **innodb_buffer_pool_size** - the default value is 35% of the available ram |
|
|
|
|
|
|
|
|
|
|
|
Usage: |
|
|
|
|
|
|
|
|
|
|
|
.. code-block:: yaml |
|
|
|
|
|
|
|
|
|
|
|
galera: |
|
|
|
|
|
master: |
|
|
|
|
|
innodb_buffer_pool_size: 1024M |
|
|
|
|
|
slave: |
|
|
|
|
|
innodb_buffer_pool_size: 1024M |
|
|
|
|
|
|
|
|
Usage |
|
|
Usage |
|
|
===== |
|
|
===== |
|
|
|
|
|
|
|
|
MySQL Galera check sripts |
|
|
MySQL Galera check sripts |
|
|
|
|
|
|
|
|
.. code-block:: bash |
|
|
.. code-block:: bash |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mysql> SHOW STATUS LIKE 'wsrep%'; |
|
|
mysql> SHOW STATUS LIKE 'wsrep%'; |
|
|
|
|
|
|
|
|
mysql> SHOW STATUS LIKE 'wsrep_cluster_size' ;" |
|
|
mysql> SHOW STATUS LIKE 'wsrep_cluster_size' ;" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. code-block:: bash |
|
|
.. code-block:: bash |
|
|
|
|
|
|
|
|
Enter current password for root (enter for none): |
|
|
|
|
|
|
|
|
Enter current password for root (enter for none): |
|
|
OK, successfully used password, moving on... |
|
|
OK, successfully used password, moving on... |
|
|
|
|
|
|
|
|
Setting the root password ensures that nobody can log into the MySQL |
|
|
Setting the root password ensures that nobody can log into the MySQL |
|
|
root user without the proper authorisation. |
|
|
root user without the proper authorisation. |
|
|
|
|
|
|
|
|
Set root password? [Y/n] y |
|
|
Set root password? [Y/n] y |
|
|
New password: |
|
|
|
|
|
Re-enter new password: |
|
|
|
|
|
|
|
|
New password: |
|
|
|
|
|
Re-enter new password: |
|
|
Password updated successfully! |
|
|
Password updated successfully! |
|
|
Reloading privilege tables.. |
|
|
Reloading privilege tables.. |
|
|
... Success! |
|
|
... Success! |
|
|
|
|
|
|
|
|
Cleaning up... |
|
|
Cleaning up... |
|
|
|
|
|
|
|
|
5. service mysql stop |
|
|
5. service mysql stop |
|
|
6. uncomment all wsrep* lines except first server, where leave only in my.cnf wsrep_cluster_address='gcomm://'; |
|
|
|
|
|
|
|
|
6. uncomment all wsrep* lines except first server, where leave only in my.cnf wsrep_cluster_address='gcomm://'; |
|
|
7. start first node |
|
|
7. start first node |
|
|
8. Start third node which is connected to first one |
|
|
8. Start third node which is connected to first one |
|
|
9. Start second node which is connected to third one |
|
|
9. Start second node which is connected to third one |