1 2 3 4 5 |
wget https://repo.percona.com/apt/percona-release_0.1-4.$(lsb_release -sc)_all.deb sudo dpkg -i percona-release_0.1-4.$(lsb_release -sc)_all.deb sudo apt-get update |
1 |
sudo apt-get install libaio1 |
1 |
sudo apt-get install -y percona-xtradb-cluster-server-5.5 percona-xtradb-cluster-client-5.5 percona-xtrabackup percona-toolkit |
We recommend you not setup a password (for easy install reason), after success installing run this command :
1 2 3 |
sudo mysql -e "CREATE FUNCTION fnv1a_64 RETURNS INTEGER SONAME 'libfnv1a_udf.so'" sudo mysql -e "CREATE FUNCTION fnv_64 RETURNS INTEGER SONAME 'libfnv_udf.so'" sudo mysql -e "CREATE FUNCTION murmur_hash RETURNS INTEGER SONAME 'libmurmur_udf.so'" |
Setup MySQL password
1 |
mysql -uroot |
Enable MySQL remote connection
1 |
CREATE USER 'root'@'%' IDENTIFIED BY 'p@ssw0rd';GRANT ALL on *.* TO 'root'@'%' IDENTIFIED BY 'p@ssw0rd' WITH GRANT OPTION;FLUSH PRIVILEGES; |
Edit MySQL configuration :
1 |
nano /etc/mysql/my.cnf |
Find this code :
1 |
bind-address = 127.0.0.1 |
replace with :
1 |
bind-address = 0.0.0.0 |
Restart MySQL Service
1 |
/etc/init.d/mysql restart |
Let’s test Mysql remote connection
128.92.9.1 (your ip address)
username : root
password : p@ssw0rd
change your mysql password again :
1 |
sudo mysql -uroot |
1 |
DROP USER 'root'@'%'; FLUSH PRIVILEGES; |
Repeat syntax like on the top but replace :
1 |
IDENTIFIED BY 'p@ssw0rd'; |
with your new password. Okayy that’s it’s happy coding!
References
https://www.percona.com/downloads/Percona-XtraDB-Cluster/LATEST/
Installing Percona XtraDB Cluster from source
https://www.percona.com/doc/percona-xtradb-cluster/5.5/installation/compiling_xtradb_cluster.html
Installing Percona XtraDB Cluster from binary
https://www.percona.com/doc/percona-xtradb-cluster/5.6/installation.html