mysql 5.1 with galera cluster node fails to use the mysql acl table

443 views
Skip to first unread message

agent_smith

unread,
Nov 10, 2011, 1:20:04 PM11/10/11
to codership
Hello,


I am new to galera and tried to set up a new cluster with 2 nodes just
to play with it.
I ma running debian 6 on both nodes and downloaded and installed the
debs from launchpad.
On one of the nodes when the wsrep provider is enabled it suddendly
only recognizes the local root account in mysql and ignores all other
accounts and hosts in there making it impossible to sync from another
node as I get mysql ERROR 1130 (HY000): Host 'hostns.network.net' is
not allowed to connect to this MySQL server when the node tries to get
a snapshot to sync.

Can anyone help me please?

Thanks!

Alex Yurchenko

unread,
Nov 10, 2011, 2:27:00 PM11/10/11
to codersh...@googlegroups.com
Hi.

1) could you please be more specific as to why do you think that
loading wsrep provider makes it ignore all accounts except local root?

2) note that the joining node must have the same user privileges as the
first one, and these privileges should allow:
- root connection from any potential node of the cluster to any
other potential node (that is, in your case, first->second and
second->first)
- root connection from localhost to localhost
and all these accounts should have the same password.

This should be verified before you're even try to join a cluster. Just
start two standalone servers and test root access back and forth.

3) if the above does not work, try setting skip_name_resolve=ON and use
IP addresses

4) use 'rsync' SST, but that requires setting wsrep_provider and
wsrep_cluster_address on startup.

Regards,
Alex

--
Alexey Yurchenko,
Codership Oy, www.codership.com
Skype: alexey.yurchenko, Phone: +358-400-516-011

agent_smith

unread,
Nov 10, 2011, 2:40:05 PM11/10/11
to codership
Hello Alex,

1) I am confirming that the node "ignores" the privileges table as
when wsrep is enabled I can only login to mysql locally with the root
user only.
If I start the server with --no-defaults every account in the
privileges table works just fine.

2) I have made accounts in both nodes that have all the privileges and
same user/pass for any host.

3) I will try that and get to you.

4) I had set rsync at some point and the server refused to even open a
mysql socket for some reason.

Kind Regards.

On Nov 10, 7:27 pm, Alex Yurchenko <alexey.yurche...@codership.com>
wrote:

Alex Yurchenko

unread,
Nov 10, 2011, 3:38:13 PM11/10/11
to codersh...@googlegroups.com
On 10.11.2011 22:40, agent_smith wrote:
> Hello Alex,
>
> 1) I am confirming that the node "ignores" the privileges table as
> when wsrep is enabled I can only login to mysql locally with the root
> user only.
> If I start the server with --no-defaults every account in the
> privileges table works just fine.

I can't reproduce that.

--no-defaults turns off reading any configuration files, not just
wsrep_provider variable.

How about

a) comment out only wsrep_provider option in your config files ant try
again.
b) try mysqld --no-defaults
--wsrep_provider=/usr/lib/galera/libgalera_smm.so

> 2) I have made accounts in both nodes that have all the privileges
> and
> same user/pass for any host.
>
> 3) I will try that and get to you.
>
> 4) I had set rsync at some point and the server refused to even open
> a
> mysql socket for some reason.

Understandably rsync must happen before storage engines initialization,
so, if it fails, server quits uninitialized, without even creating a pid
file. So you can login to server only AFTER it has successfully
connected and transferred state. And that's why you have to set
wsrep_cluster_address in my.cnf or on command line. It is too late to
set it up from client.

Need to check error log as to why it failed.

--

agent_smith

unread,
Nov 10, 2011, 5:58:01 PM11/10/11
to codership
Hi Alex,

I've just run the node with --no-defaults and specified the
wsrep_provider and the auth works but gives out another error:
mysqldump: Error: 'Unknown command' when trying to dump tablespaces
mysqldump: Got error: 1047: Unknown command when selecting the
database
And it seems when I enable the wsrep provider mysql says unknown
command for GRANT and some other commands.

Kind Regards.

On Nov 10, 8:38 pm, Alex Yurchenko <alexey.yurche...@codership.com>

Alex Yurchenko

unread,
Nov 10, 2011, 8:41:59 PM11/10/11
to codersh...@googlegroups.com
On 11.11.2011 01:58, agent_smith wrote:
> Hi Alex,
>
> I've just run the node with --no-defaults and specified the
> wsrep_provider and the auth works but gives out another error:
> mysqldump: Error: 'Unknown command' when trying to dump tablespaces
> mysqldump: Got error: 1047: Unknown command when selecting the
> database

So,
1) you have a problem in your configs and you must figure it out before
you continue. I'd suspect wrong datadir setting which points to a
database directory with wrong privileges.
2) 'Unknown command' is expected: you specified provider, but have not
connected to any service/cluster (wsrep_cluster_address unset). So most
SQL commands are turned off until you do so.

--

agent_smith

unread,
Nov 11, 2011, 4:52:08 AM11/11/11
to codership
Hi Alex,

I solved the issue with the tables, it turns out the previous install
of mysql percona 5.5 had left some tables with an engine not available
to normal mysql.
I am now still trying to find why only the local root account works
when the wsrep provider is enabled in the node via the config.
It works fine when I just start mysql with no-defaults and specify
only the wsrep provider.

Any ideas what config options may bring out that behaviour ?

Kind Regards.

On Nov 11, 1:41 am, Alex Yurchenko <alexey.yurche...@codership.com>
> >> >> Skype: alexey.yurchenko, Phone:+358-400-516-011begin_of_the_skype_highlighting            +358-400-516-011
>
> >> --
> >> Alexey Yurchenko,
> >> Codership Oy,www.codership.com
> >> Skype: alexey.yurchenko, Phone:+358-400-516-011begin_of_the_skype_highlighting            +358-400-516-011
>
> --
> Alexey Yurchenko,
> Codership Oy,www.codership.com
> Skype: alexey.yurchenko, Phone:+358-400-516-011begin_of_the_skype_highlighting            +358-400-516-011

alexey.yurchenko

unread,
Nov 11, 2011, 5:42:49 AM11/11/11
to agent_smith, codership
Hi,
1) I don't think you're supposed to run MySQL 5.1 on top of 5.5 datadir. Btw we have released 5.5 version. You either have to use that or recreate datadir from scratch.
2) have you tried to run mysqld with wsrep_provider commented out in configs?
3) please post the error log from the startup.
Regards,
Alex

agent_smith <awar...@gmail.com> wrote:

>--
>You received this message because you are subscribed to the Google Groups "codership" group.
>To post to this group, send email to codersh...@googlegroups.com.
>To unsubscribe from this group, send email to codership-tea...@googlegroups.com.
>For more options, visit this group at http://groups.google.com/group/codership-team?hl=en.
>

agent_smith

unread,
Nov 11, 2011, 5:42:58 AM11/11/11
to codership
Hi,

I think I fixed the issue for now. Thank you very much for all your
help :)

Do you have a deb of mysql 5.5 patched ?
Also are there any plans for percona-server patches ?

Kind Regards.

On Nov 11, 10:42 am, "alexey.yurchenko"
> >> >> >> Skype: alexey.yurchenko, Phone:+358-400-516-011begin_of_the_skype_highlighting            +358-400-516-011      begin_of_the_skype_highlighting            +358-400-516-011begin_of_the_skype_highlighting            +358-400-516-011
>
> >> >> --
> >> >> Alexey Yurchenko,
> >> >> Codership Oy,www.codership.com
> >> >> Skype: alexey.yurchenko, Phone:+358-400-516-011begin_of_the_skype_highlighting            +358-400-516-011
>
> >> --
> >> Alexey Yurchenko,
> >> Codership Oy,www.codership.com
> >> Skype: alexey.yurchenko, Phone:+358-400-516-011begin_of_the_skype_highlighting            +358-400-516-011      begin_of_the_skype_highlighting            +358-400-516-011begin_of_the_skype_highlighting            +358-400-516-011
>
> >--
> >You received this message because you are subscribed to the Google Groups "codership" group.
> >To post to this group, send email to codersh...@googlegroups.com.
> >To unsubscribe from this group, send email to codership-tea...@googlegroups.com.
> >For more options, visit this group athttp://groups.google.com/group/codership-team?hl=en.Hi,

Alex Yurchenko

unread,
Nov 11, 2011, 7:58:10 AM11/11/11
to codersh...@googlegroups.com
On 11.11.2011 13:42, agent_smith wrote:
> Hi,
>
> I think I fixed the issue for now. Thank you very much for all your
> help :)

Glad to hear that.

> Do you have a deb of mysql 5.5 patched ?

Nope :( . There are some unresolved issues still (e.g. there are still
no official client/shared DEBs). But I believe you should be able to use
a binary tarball on Debian-based ssytems.

> Also are there any plans for percona-server patches ?

That's a question to Percona:
http://www.mysqlperformanceblog.com/2011/10/03/percona-server-5-5-15-galera-21-1-beta2/

But I'd wait for a more fresh release. Beta2 was still buggy.

Regards,
Alex

--

Reply all
Reply to author
Forward
0 new messages