Hey there,
In the pt-slave-find man page it says
““pt-slave-find” reads all normal MySQL option files, such as ~/.my.cnf, so you may not need to specify username, password and other common options at all.”
This does not seem to be happening on my machine though.
Attempting to run pt-slave-find from a privileged user’s home directory:
user@server:~ » pt-slave-find localhost
DBI connect(';host=localhost;mysql_read_default_group=client','',...) failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) at /usr/bin/pt-slave-find line 1995
/var/lib/mysql/mysql.sock is not where the socket file is located for my connection, that info is specified in the user’s .my.cnf file in the home directory. Seems it’s not being read when pt-slave-find is invoked.
manually specifying the socket file:
user@server:~ » pt-slave-find --socket=/path/to/socket.sock localhost
DBI connect(';host=localhost;mysql_socket==/path/to/socket.sock;mysql_read_default_group=client','',...) failed: Access denied for user 'user'@'localhost' (using password: NO) at /usr/bin/pt-slave-find line 1995
Again, password value is specified in the .my.cnf file for the user in question that is executing the command. Doesn’t seem to be getting read.
What am I missing here?