Control Web Panel

WebPanel => MySQL => Topic started by: saltire on March 28, 2016, 07:03:27 PM

Title: Maria Galera
Post by: saltire on March 28, 2016, 07:03:27 PM
Hi,
Im trying to setup galera, so far all I have manged to do is break my DBs... Ive tried following the instructions on the wiki, but its not quite clear on what goes where & what commands are run on what server.

Has anyone installed/gotten Galera working?

TIA
Title: Re: Maria Galera
Post by: Sandeep on March 29, 2016, 06:30:13 AM
yes working
Title: Re: Maria Galera
Post by: saltire on March 29, 2016, 07:56:57 AM
ok, was that using the wiki instructions?  could you give me a quick rundown on how you got it working?
Title: Re: Maria Galera
Post by: Administrator on March 29, 2016, 08:49:59 AM
there was some changes with MariaDB and Galera, since Galera is now integrated with MariaDB-Server there is no more MariaDB-Galera-Server, also wiki was updated , also there are some changes in mariadb configuration, like missing:
Code: [Select]
wsrep_on=ON
Title: Re: Maria Galera
Post by: saltire on March 29, 2016, 09:08:34 AM
there was some changes with MariaDB and Galera, since Galera is now integrated with MariaDB-Server there is no more MariaDB-Galera-Server, also wiki was updated , also there are some changes in mariadb configuration, like missing:
Code: [Select]
wsrep_on=ON

yeh noticed that..  does that missing bit go anywhere inbetween the other wsrep statements?
Title: Re: Maria Galera
Post by: Administrator on March 29, 2016, 11:06:58 AM
you can check this instructions, they are tested yesterday...and changes from MariaDB are now also updated.
http://wiki.centos-webpanel.com/mysql-cluster-mariadb-galera
Title: Re: Maria Galera
Post by: saltire on March 29, 2016, 01:17:28 PM
doh!  schoolboy error.. start again... I think I know where I went wrong. Will try again
Title: Re: Maria Galera
Post by: saltire on March 30, 2016, 11:28:41 AM
Ok, Im starting all over again with a fresh installs. I`ll be configuring 2 servers & using exact details on wiki (replacing wiki IPs with my own)..
lets see how this goes..
Title: Re: Maria Galera
Post by: saltire on March 30, 2016, 01:12:53 PM
Right,

Got it working at last...
Issues were mainly down to misunderstanding the wiki instructions. OR potentially something else I was doing wrong...
I could only get it to work when All sql root passwords were the same on all server. Also I was trying to give the sst user its own password, but again only worked when using same sql  password on all servers.

I just need to make it a bit more secure now & change the @% to @IP

& last Q.. will that take care of all databases on the server, or do I need to add each one in separately?

Title: Re: Maria Galera
Post by: Administrator on March 30, 2016, 01:15:53 PM
this is server cluster for innoDB, meaning that all databases will be clustered as master/master.
Title: Re: Maria Galera
Post by: saltire on March 30, 2016, 06:34:03 PM
Cool, thanks for that.... I was fibbing a bit when I said that was last Question.....

This is more a how now shold this work...

so Im up & running, synced. If I make changes to CWP, say add a user, will that user be replicated to the CWP on other server, or do I still need to do some other work? Rsync cwp dir?

**on checking, user is replecated in DB, but doesn't appear in CWP** So I guess Im missing something.
Title: Re: Maria Galera
Post by: saltire on March 30, 2016, 07:43:18 PM
**update**
ERROR! MySQL is running but PID file could not be found

Trying to start mysql server, please reload browser!

Could not connect: Connection refused
this is on logon page fro cwp

**edit ** fixed, just re-ran /etc/init.d/mysql start --wsrep-new-cluster  & it worked
Title: Re: Maria Galera
Post by: Administrator on March 31, 2016, 01:29:22 PM
users are in file and also all user files are not synced with mysql since that is database only sync.
Title: Re: Maria Galera
Post by: saltire on March 31, 2016, 01:31:06 PM
I know its bad form to reply to own posts.. but, just incase it helps...

I was struggling to get Galera to stay up.. it would work for a couple of hours, then fall over. & only work when I disabled csf restarted the cluster, then restarted csf.
after a bit of digging, I discovered other ports need opening (wiki only lists 3306)

If you add Ports 4567,4568 & 4444 TCP & 4567 UDP  that should help.....