title: How to execute SQL command with parameters in bash script
body: <p>I would like to make a bash script which will add user to my custom table in MySQL database. I have username as script argument stored in variable $USERNAME and I need to execute this query into MySQL server:</p>
  
  <pre><code>INSERT INTO `user` VALUES ('$USERNAME', password)
  </code></pre>
  
  <p>I know how to execute a sql file but that won't help me when I have username in variable. The only way I can think of is to execute php file with GET values and execute sql command in php. And I'm not eve sure that with php will work as I think.</p>
  
  <p>Is there any better way?</p>
  
  <p>Thanks</p>
  
  <p>EDIT:
  After your helpfull answers I went with this command which works:</p>
  
  <pre><code>mysql -ppassword --default-character-set=utf8 -e "INSERT INTO table VALUES (\"$USERNAME@\",\"password\")" database
  </code></pre>