Need to pass "mysql_upgrade" option to " mysqld_safe" non-interactively for upgr


I am performing upgrade from Percona 5.5 to 5.6 (Manual upgrade works fine). However, I need to pass “mysql_upgrade” option to " [COLOR=#3933FF]" script non-interactively.

Please help, it is needed for our automated chef cookbook. But ‘mysql_upgrade’ option is to passed while ‘mysql_safe’ command is still in progress, which keeps the script at the same step waiting for it to complete and next step to pass the ‘mysql_upgrade’ option is never reached.

If we can pass ‘mysql_upgrade’ non-interactively to ‘mysql_safe’ script somehow, it will be a great help.

Just for more information. I tried the following and it did not work for me :frowning:

mysql_upgrade -u root -p$(cat ~/.mysql) | mysqld_safe --skip-grant-tables --user=mysql &