Posts Tagged Cluster
How to setup Percona XtraDB Cluster
Posted by mcsrainbow in Database, Linux&Unix on November 18, 2013
Environment:
servers: demoenv-trial-1 demoenv-trial-2 demoenv-trial-3
1. Install Percona Server, on all servers:
$ sudo yum install http://www.percona.com/downloads/percona-release/percona-release-0.0-1.x86_64.rpm
$ sudo yum install http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
$ sudo yum install Percona-Server-shared-compat
$ sudo yum install Percona-Server-server-55 Percona-Server-client-55
2. Configure the /etc/my.cnf, on all servers:
$ sudo vim /etc/my.cnf
[mysqld] # basic settings datadir = /opt/mysql/data tmpdir = /opt/mysql/tmp socket = /opt/mysql/run/mysqld.sock port = 3306 pid-file = /opt/mysql/run/mysqld.pid # innodb settings default-storage-engine = INNODB innodb_file_per_table = 1 log-bin = /opt/mysql/binlogs/bin-log-mysqld log-bin-index = /opt/mysql/binlogs/bin-log-mysqld.index innodb_data_home_dir = /opt/mysql/data innodb_data_file_path = ibdata1:10M:autoextend innodb_log_group_home_dir = /opt/mysql/data binlog-do-db = testdb # server id server-id=1 # other settings max_allowed_packet = 64M max_connections = 1024 expire_logs_days = 14 character-set-server = utf8 [mysqld_safe] log-error = /opt/mysql/log/mysqld.log pid-file = /opt/mysql/run/mysqld.pid open-files-limit = 8192 [mysqlhotcopy] interactive-timeout [client] port = 3306 socket = /opt/mysql/run/mysqld.sock default-character-set = utf8
3. Create directories, on all servers:
$ sudo mkdir -p /opt/mysql/{data,tmp,run,binlogs,log}
$ sudo chown mysql:mysql /opt/mysql/{data,tmp,run,binlogs,log}
4. Initialize the database, on all servers:
$ sudo -i
# su - mysql
$ mysql_install_db --user=mysql --datadir=/opt/mysql/data/
$ exit
# exit
$ sudo /etc/init.d/mysql start
5. Remove them without dependencies, on all servers:
Because if we install xtradb cluster, we will get error messages like:
Error: Percona-XtraDB-Cluster-client conflicts with Percona-Server-client-55-5.5.34-rel32.0.591.rhel6.x86_64
Error: Percona-XtraDB-Cluster-server conflicts with Percona-Server-server-55-5.5.34-rel32.0.591.rhel6.x86_64
Error: Percona-XtraDB-Cluster-shared conflicts with Percona-Server-shared-55-5.5.34-rel32.0.591.rhel6.x86_64
$ sudo /etc/init.d/mysql stop
$ sudo rpm -qa | grep Percona-Server | grep -v compat | xargs sudo rpm -e --nodeps
Read the rest of this entry »
Recent Comments
pls tell me how to lock the target directory of the bbcp user?
Hi, i am trying to send out mail to office 365 and i am getting below error…
How to do the above settings for windows 7 machine and jenkins hosted on tomcat installed on the same machine??
Hey pal, who said pfSense sucks screw you!
Hey dear can we done some Project together ? i am from iran and i have some…
Upload it to Mega.nz
How can I replicate this issue.? I also faced the same problem, where all the cron entries lost. Not sure…
Hi, I am trying to integrate Jenkins with office365 and as mentioned above, (please correct me if i am…
Hi, I am trying to integrate Jenkins with office365 and as mentioned above, (please correct me if i am…
Vishal : shreyas :…