My system monitoring program isn't working anymore since upgrading from Ubuntu Server 14.04 to 16.04 with MySQL 5.6 to 5.7. It performs the following command:
mysqladmin -u statuser extended-status
It also sets the MYSQL_PWD environment variable for that process to the required password. The error message however is:
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'statuser'@'localhost' (using password: YES)'
When I try it interactively, it works fine:
mysqladmin -u statuser -p extended-status
(type in the password)
When I try to reproduce the tool's behaviour like this, it also fails:
MYSQL_PWD='********' mysqladmin -u statuser extended-status
So isn't MYSQL_PWD supported anymore? But it says "using password: YES" so it must have noticed my environment variable. It just doesn't seem to read it right.
MYSQL_PWD='xxx' mysql -u statuser -p
MYSQL_PWD
env variable is discouraged.MYSQL_PWD=abc123 mysql -u newuser
I'm thinking some kind of quote trimming has changed