-1

I was working on a MySQL Fabric installation, and had been working with disable_authentication set to yes:

...
[protocol.xmlrpc]
address = 0.0.0.0:32274
threads = 5
user = admin
password = hunter2
disable_authentication = yes
realm = MySQL Fabric
ssl_ca =
ssl_cert =
ssl_key =
...

I set it to 'no', and ran mysqlfabric manage stop then mysqlfabric manage start --daemonize. The client app broke, so I set disable_authentication back to 'yes' and ran mysqlfabric stop again to restart it, but I got:

Permission denied.

I looked through the documentation, both locally and at online, and haven't seen any way to pass a username and password to the mysqlfabric utility. I tried -u -p as in MySQL and --user and --password, to no avail. The latter gives

mysqlfabric: error: no such option: --password

Which seems to suggest that --user is a valid option, but I tried --pass and -p with no success.

I could probably just kill the process, but I'd like to know how to cleanly restart the server when authentication is enabled.

cincodenada
  • 2,877
  • 25
  • 35

1 Answers1

0

After plumbing around in the code for mysqlfabric, I noticed that it looked like the mysqlfabric utility was re-reading the newly-modified config file, seeing that disable_authentication was now set to 'yes', and thus clearing out any credentials, even if I specified them on the command line.

As far as I can tell, the running mysqlfabric instance still had credentials enabled, so when it was presented with the cleared-out credentials, it denied permission.

The solution was to change the config file back to disable_authentication = no, stop the server, then edit the config file to disable authentication, and start back up.

Takeway lesson:
Don't modify the Fabric configuration file while it's running, make sure to stop the server, edit the config, and then start it back up.

While I was at it, it seems that if you do need to specify a username/password, the command is indeed:

mysqlfabric manage stop --user=<username>

It will then prompt for a password.

cincodenada
  • 2,877
  • 25
  • 35