My SQL command not working

#1

Hi experts my below command has errors can you pls help
execute 'create-password' do
command "root_temp_pass=$(grep 'A temporary password' /mysql/log/mysqld.log |tail -1 |awk '{split($0,a,": "); print a[2]}') \ mysql -uroot -p'$root_temp_pass' -- connect-expired-password -Be 'ALTER USER 'root'@'localhost' IDENTIFIED BY '#{pw}'"
not_if "mysql -u root -p'#{pw}'"
end

Option command must be a kind of [String, Array]! You passed {:"root_temp_pass=$(grep 'A temporary password' /mysql..........

can you pls help on this

0 Likes