Ana içeriğe atla

mysql külüstür

Son günlerde mysql replikasyon ve clusterları ile eğlenip duruyorken, ülkemizde çok fazla galere cluster eklentisiyle, master-master mysql cluster/replikasyon kullanılmadığını fark ettim.

Yolu buradan geçen mysql kullanıcılarına, tavsiyem standard replikasyonları bir tarafa bırakıp, percona extradb cluster veya mariadb'yi galere wsrep eklentisiyle kullanmalarını, en azından test etmelerini tavsiye ederim.

percona extradb cluster - master-master yapısında yüzlerce tablo, milyarlarca satır içeren tabloları rahatlıkla kullanabilirsiniz. Şu ana kadar sanal makineler üzerinde 500 milyon civarında satır içeren tablolarla test yaptım. Aktif olarakta kullanılmaktadır.  Sorun yok. Yeterki düzgün sql sorgusu yapın.



Ubuntu  LTS  16.04  üzerine kurulumuda oldukça basit.

Her hangi ilave repo kullanmadan standart ubuntu reposunu kullanabilirsiniz!
# apt-get install percona-xtradb-cluster-server
Bundan sonra;
                        /etc/mysql/percona-xtradb-cluster.conf.d/mysqld.cnf
dosyasını kendinize göre düzeltmeniz yeterli.


Aşağıdaki örneği inceleyebilirsiniz;

#cat mysqld.cnf
#
# The Percona XtraDB Cluster 5.6 configuration file.
#
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html

[mysqld]
#
# * Basic Settings
#
user        = mysql
pid-file    = /var/run/mysqld/mysqld.pid
socket        = /var/run/mysqld/mysqld.sock
port        = 3306
basedir        = /usr
datadir        = /var/lib/percona-xtradb-cluster
tmpdir        = /tmp
lc-messages-dir    = /usr/share/mysql
skip-external-locking
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
#bind-address        = 127.0.0.1
#
# * Fine Tuning
#
key_buffer        = 16M
max_allowed_packet    = 16M
thread_stack        = 192K
thread_cache_size       = 8
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover         = BACKUP
#max_connections        = 100
#table_cache            = 64
#thread_concurrency     = 10
#
# * Query Cache Configuration
#
query_cache_limit    = 1M
query_cache_size        = 16M
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
# As of 5.1 you can enable the log at runtime!
#general_log_file        = /var/log/mysql/mysql.log
#general_log             = 1
#
# Error log - should be very few entries.
#
log_error = /var/log/mysql/error.log
#
# Here you can see queries with especially long duration
#log_slow_queries    = /var/log/mysql/mysql-slow.log
#long_query_time = 2
#log-queries-not-using-indexes
#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
#       other settings you may need to change.
server-id        = 3
expire_logs_days    = 10
max_binlog_size         = 100M
binlog_do_db        = include_database_name
#binlog_ignore_db    = include_database_name
#
# * InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in
# /var/lib/percona-xtradb-cluster.
# Read the manual for more InnoDB related options. There are many!
#
# * Security Features
#
# Read the manual, too, if you want chroot!
# chroot = /var/lib/percona-xtradb-cluster
#
# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
#
ssl-ca=/etc/mysql/cert/mysql-cacert.pem
ssl-cert=/etc/mysql/cert/mysql-server-cert.pem
ssl-key=/etc/mysql/cert/mysql-server-key.pem
#
# * Galera
#
# Path to Galera library
wsrep_provider=/usr/lib/libgalera_smm.so
#
# Add address of other cluster nodes here
wsrep_cluster_address=gcomm://10.255.255.51,10.255.255.52,10.255.255.53
#log_bin
# In order for Galera to work correctly binlog format should be ROW
binlog_format=ROW
#
# MyISAM storage engine has only experimental support
default_storage_engine=InnoDB
#
# This changes how InnoDB autoincrement locks are managed and is a requirement for Galera
innodb_autoinc_lock_mode=2
#
# Node #3 address
wsrep_node_address=10.255.255.53
wsrep_node_name=10.255.255.53
#
# SST method
wsrep_sst_method=xtrabackup-v2
#
# Cluster name
wsrep_cluster_name=feza
#
# Authentication for SST method
wsrep_sst_auth="sstuser:sK7mlNeXE"

wsrep_certify_nonPK=1
wsrep_debug=1
wsrep_retry_autocommit=1
wsrep_auto_increment_control=1
wsrep_drupal_282555_workaround=0

#wsrep_provider_options="socket.ssl_key=/etc/mysql/cert/mysql-server-key.pem;socket.ssl_cert=/etc/mysql/cert/mysql-server-cert.pem.pem;socket.ssl_ca=/etc/mysql/cert/mysql-cacert.pem"

remzi@tashan:~$






Daha fazla bilgi almak için aşağıdaki sayfalara göz atabilirsiniz!

https://learn.percona.com/download-percona-xtradb-cluster-5-6-manual

http://galeracluster.com/documentation-webpages/galerainstallation.html

http://galeracluster.com/documentation-webpages/reference.html

https://www.percona.com/doc/percona-xtradb-cluster/5.6/howtos/ubuntu_howto.html#ubuntu-howto



http://releases.galeracluster.com/

http://galeracluster.com/documentation-webpages/quorumreset.html

https://www.percona.com/blog/2014/09/01/galera-replication-how-to-recover-a-pxc-cluster/

http://galeracluster.com/documentation-webpages/sslconfig.html


Unutmayınız, mysql ile milyarlarca kayıt tutabilirsiniz!

Yorumlar

Bu blogdaki popüler yayınlar

Günün komutu - Linux sistemlerinde {2015.12.26} - memhog - basitce hafıza testi

Bu yılda bitmek üzere. Bu yıl biterken faydalı bir komutla yeni yıllar dilemek istiyorum. Bu günkü komutumuz memhog. memhog'u kullanmak için numactl paketinin yüklü olması, yüklü değilse kurmak gerekiyor, oracle linux(rhel tabanlı sistemlerde); yum install numactl Kullanımıda oldukça basit: # memhog memhog [-rNUM] size[kmg] [policy [nodeset]] -rNUM repeat memset NUM times -H disable transparent hugepages Policies: interleave membind preferred default  # memhog 17G numactl: mmap: Cannot allocate memory # memhog 512M .................................................... # Bu faydalı komutu kullanmadan önce swap devre dışı bırakmanız iyi olur.

ttnet tilgin hg1332 modem(router) kablosuz özelliğini güçlendirmek

Bu gün ttnetin hediyesi olan tilgin yönlendiriciyle biraz oynayayım dedim Matkap, ve rg316-rp-sma kablo alıp cihazın kapağını tekrar açtım. Matkapla usb çıkışın yanına bir delik açarak kaployu taktım. Sonra elimdeki antenlerden ikiti tanesini takıp test ettim. . Bu iki antenin, gözle farkedilir derecede sinyalleri kuvvetlendirdiğini fark ettim.. Normalde bu cihaz ile evin iki en uc noktaları arasında haberleşme olmaz iken şimdi en kör iki uç arasında sorun olmadan kablosuz kullanılabildiğini gördüm. Arada 4 tane kuvvetli beton duvar mevcut. Deneme bitti, tilgin rafa kalktı yine. Her nekadar ben bu cihazı kaldırsamda, kullanmak zorunda olan arkadaşlar, bir kablo ve ikitane anten takarak her herde kullanabilirler. İyi eğlenceler.