title: Can't insert byte[] into MySQL using java
body: <p>Following is the code I have used:</p>
  
  <pre><code>byte[] bkey = key.getEncoded();
  String query = "INSERT INTO keytable (name, key) VALUES (?,?)";
  PreparedStatement pstmt = (PreparedStatement) connection.prepareStatement(query);
  pstmt.setString(1, "test");
  pstmt.setBytes(2, bkey);
  pstmt.execute();
  </code></pre>
  
  <p>And following is an error I got:</p>
  
  <pre><code>com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key) VALUES ('test',_binary'?ʾ??s??u\'?}p?u')' at line 1
  </code></pre>
  
  <p>I have MySQL 5.0.41 and <code>mysql-connector-java-5.1.7-bin.jar</code> as JDBC library.
  Is anyone can help me out here?
  Thanks in advance!</p>