title: grant command syntax error near password area in shell script
body: <p>I have created a shell script like this.But getting syntax error in grant command, I think near password area.Please help me if anyone could.</p>
  
  <pre><code>ssh -t qbadmin@10.3.2.0 '
   su root -c "
     echo \"Give db name :\";
     read db_name;
     echo \"Give password :\";
     read db_pass;
     host=localhost;
     sql1=\"create database \$db_name;\";
     sql2=\"grant all on \${db_name}.* to \${db_name}@\${host} identified by \"\${db_pass}\";\";
     sql3=\"\${sql1}\${sql2}\";
     mysql -u root -p -e \"\${sql3}\";
   ";
  '
  </code></pre>
  
  <p>The database has created in the remote machine successfully, but the grant command returned error..! My guess is the error might be because of the usage of \" character before and after ${db_pass} in the grant command.Please do help me to solve this.</p>
  
  <p>Thanks.</p>