0

group add command throws an error

$ mysqlfabric group add group_id-1 127.0.0.1:70002
Fabric UUID:  5ca1ab1e-a007-feed-f00d-cab3fe13249e
Time-To-Live: 1

ServerError: User (fabric) does not have appropriate privileges (ALL PRIVILEGES) on server (127.0.0.1:70002, 33c14c02-4f 67-11e4-8df7-00ffb263a4ad).

Why does this happen? what privileges does fabric need ?

I run the fabric and mysql server instance on the same machine, the state storage uses localhost:70001 mysql instance.

user fabric's privileges on MySQL Instance localhost:70002

$ mysql -u root -P70002 -e "show grants for fabric"
+---------------------------------------------------------------+
| Grants for fabric@%                                           |
+---------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'fabric'@'%' WITH GRANT OPTION |
+---------------------------------------------------------------+
$ mysql -u root -P70002 -e "show grants for fabric@127.0.0.1"
+-----------------------------------------------------------------------+
| Grants for fabric@127.0.0.1                                           |
+-----------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'fabric'@'127.0.0.1' WITH GRANT OPTION |
| GRANT ALL PRIVILEGES ON `fabric`.* TO 'fabric'@'127.0.0.1'            |
+-----------------------------------------------------------------------+
$ mysql -u root -P70002 -e "show grants for fabric@localhost"
+-----------------------------------------------------------------------+
| Grants for fabric@localhost                                           |
+-----------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'fabric'@'localhost' WITH GRANT OPTION |
| GRANT ALL PRIVILEGES ON `fabric`.* TO 'fabric'@'localhost'            |
+-----------------------------------------------------------------------+
wener
  • 7,191
  • 6
  • 54
  • 78

1 Answers1

1

I changed the logging level on /etc/mysql/fabric.cfg to DEBUG

[logging]
level = DEBUG

From there I could see that my slave mysqld running on port 130001 was not running with gtid on and log_bin

I added those parameters and restarted the slave instance.

[mysqld]
log_bin=/home/mysql/13001
gtid-mode=ON

I was then able to add the slave instance to the fabric group.

RafaelK
  • 11
  • 1