Double quotes on password prompt breaks the script #251

blopper opened this Issue Oct 8, 2016 · 2 comments


None yet

2 participants

blopper commented Oct 8, 2016

If you have double quotes ( " ) in your root mysql password mysqltuner will exit with an error unable to match " This is a shell error, see output bellow

`# ./

MySQLTuner 1.7.0 - Major Hayden
Bug reports, feature requests, and downloads at
Run with '--help' for additional options and output filtering

[--] Skipped version check for MySQLTuner script
Please enter your MySQL administrative login: root
Please enter your MySQL administrative password: sh: -c: line 0: unexpected EOF while looking for matching "' sh: -c: line 1: syntax error: unexpected end of file [!!] Attempted to use login credentials, but they were invalid. [root@D2189 major-MySQLTuner-perl-3c53f7b]#


Hi @blopper

Main issue regarding support double quotes password is that Unixoid Os interpolated systematically $ character as a environment variables.

So this is not an issue we can solve easily.

We will have other issue telling us that double quote password with $ doesn't work.

So I will need help if someone have a better idea regarding this issue.

Thanks for your feedback.


blopper commented Oct 11, 2016 edited

$(printf '%q' $user_raw_passwd_input) perhaps would do?

[root@D2189 ~]# raw='fuck"shit$up!@#$%^&*()'
[root@D2189 ~]# printf '%q\n' $raw

@jmrenouard jmrenouard added enhancement and removed Questions labels Oct 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment