Description:
Impossible to stop the MySQL Server "mysqld1"...
mysql@vdbprd101:/home/mysql/ [mysqld1] mysqld_multi stop 1
WARNING: Log file disabled. Maybe directory or file isn't writable?
mysqld_multi log file version 2.16; run: Wed Aug 5 13:57:10 2015
Stopping MySQL servers
mysql@vdbprd101:/home/mysql/ [mysqld1] Warning: Using a password on the command line interface can be insecure.
/disk00/app/mysql/product/mysql-5.6.26/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'multi_admin'@'localhost' (using password: YES)'
All other commands works as expected (start and report).
The user has been created correctly and the password is correct!
Adding the password as command-line optionn, gave the expected result
mysql@vdbprd101:/home/mysql/ [mysqld1] mysqld_multi stop 1 -password=dbi05manager
WARNING: Log file disabled. Maybe directory or file isn't writable?
mysqld_multi log file version 2.16; run: Wed Aug 5 14:00:30 2015
Stopping MySQL servers
Warning: Using a password on the command line interface can be insecure.
Verification using the MySQL utility "my_print_defaults" gave the correct result (since MySQL 5.6.25 the password is no more visible in cleartext by default, add the option "-s")
mysql@vdbprd101:/home/mysql/ [mysqld1] my_print_defaults mysqld_multi
--user=multi_admin
--password=*****
mysql@vdbprd101:/home/mysql/ [mysqld1] my_print_defaults mysqld_multi -s
--user=multi_admin
--password=dbi05manager
How to repeat:
mysql> show grants for 'multi_admin'@'localhost';
+-----------------------------------------------------------------------------------------------------------------------+
| Grants for multi_admin@localhost |
+-----------------------------------------------------------------------------------------------------------------------+
| GRANT SHUTDOWN ON *.* TO 'multi_admin'@'localhost' IDENTIFIED BY PASSWORD '*1F95F9496F78BA384737C7921472C74BB6371CD6' |
+-----------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
mysql> show grants for 'multi_admin'@'localhost';
+-----------------------------------------------------------------------------------------------------------------------+
| Grants for multi_admin@localhost |
+-----------------------------------------------------------------------------------------------------------------------+
| GRANT SHUTDOWN ON *.* TO 'multi_admin'@'localhost' IDENTIFIED BY PASSWORD '*1F95F9496F78BA384737C7921472C74BB6371CD6' |
+-----------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
Suggested fix:
Fortunately, "mysqld_multi" is a perl program :) and after a debug session .We were able to identify the problem and apply a workaround:
Edit the ${MYSQL_HOME}/bin/mysqld_multi scipt
FROM
216 my $com= join ' ', 'my_print_defaults', @defaults_options, $group;
217 my @defaults = `$com`;
TO
216 my $com= join ' ', 'my_print_defaults --show', @defaults_options, $group;
217 my @defaults = `$com`;
The purpose of the above lines is simple to understand; Read the MySQL configuration using the "my_print_defaults" utility and store the output in an array.
Details about the "--show" aka. "-" option have been explained a few lines ahead. Once, the password agin available in cleartext for further processing, everything worked fine (so far).
Description: Impossible to stop the MySQL Server "mysqld1"... mysql@vdbprd101:/home/mysql/ [mysqld1] mysqld_multi stop 1 WARNING: Log file disabled. Maybe directory or file isn't writable? mysqld_multi log file version 2.16; run: Wed Aug 5 13:57:10 2015 Stopping MySQL servers mysql@vdbprd101:/home/mysql/ [mysqld1] Warning: Using a password on the command line interface can be insecure. /disk00/app/mysql/product/mysql-5.6.26/bin/mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user 'multi_admin'@'localhost' (using password: YES)' All other commands works as expected (start and report). The user has been created correctly and the password is correct! Adding the password as command-line optionn, gave the expected result mysql@vdbprd101:/home/mysql/ [mysqld1] mysqld_multi stop 1 -password=dbi05manager WARNING: Log file disabled. Maybe directory or file isn't writable? mysqld_multi log file version 2.16; run: Wed Aug 5 14:00:30 2015 Stopping MySQL servers Warning: Using a password on the command line interface can be insecure. Verification using the MySQL utility "my_print_defaults" gave the correct result (since MySQL 5.6.25 the password is no more visible in cleartext by default, add the option "-s") mysql@vdbprd101:/home/mysql/ [mysqld1] my_print_defaults mysqld_multi --user=multi_admin --password=***** mysql@vdbprd101:/home/mysql/ [mysqld1] my_print_defaults mysqld_multi -s --user=multi_admin --password=dbi05manager How to repeat: mysql> show grants for 'multi_admin'@'localhost'; +-----------------------------------------------------------------------------------------------------------------------+ | Grants for multi_admin@localhost | +-----------------------------------------------------------------------------------------------------------------------+ | GRANT SHUTDOWN ON *.* TO 'multi_admin'@'localhost' IDENTIFIED BY PASSWORD '*1F95F9496F78BA384737C7921472C74BB6371CD6' | +-----------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.00 sec) mysql> show grants for 'multi_admin'@'localhost'; +-----------------------------------------------------------------------------------------------------------------------+ | Grants for multi_admin@localhost | +-----------------------------------------------------------------------------------------------------------------------+ | GRANT SHUTDOWN ON *.* TO 'multi_admin'@'localhost' IDENTIFIED BY PASSWORD '*1F95F9496F78BA384737C7921472C74BB6371CD6' | +-----------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.00 sec) Suggested fix: Fortunately, "mysqld_multi" is a perl program :) and after a debug session .We were able to identify the problem and apply a workaround: Edit the ${MYSQL_HOME}/bin/mysqld_multi scipt FROM 216 my $com= join ' ', 'my_print_defaults', @defaults_options, $group; 217 my @defaults = `$com`; TO 216 my $com= join ' ', 'my_print_defaults --show', @defaults_options, $group; 217 my @defaults = `$com`; The purpose of the above lines is simple to understand; Read the MySQL configuration using the "my_print_defaults" utility and store the output in an array. Details about the "--show" aka. "-" option have been explained a few lines ahead. Once, the password agin available in cleartext for further processing, everything worked fine (so far).