MacPorts “selfupdate” error on OS X Mavericks

Recently I tried to update macports and got error:

$ sudo port install MySQL
...
Error: Error installing new MacPorts base: command execution failed
Please run `port -v selfupdate' for details.
Error: /opt/local/bin/port: port selfupdate failed: Error installing new MacPorts base: command execution failed

The fix is:

$ sudo xcode-select --install

Result:

The ports tree has been updated. To upgrade your installed ports, you should run
  port upgrade outdated

Way to check what mysql config used

Recently I needed to know if mysql is using any config (.cfg) except default one (/etc/my.cfg).
This command allows to check things quickly:

strace mysql ";" 2>&1 | grep cnf