title: How to store image larger than 6mb in mysql
body: <p>i want to upload image upto 6mb in mysql. now i am using longblob to store image in mysql. but it can only store images less than 500kb. Here the code is working but cant't upload large image. any one help me out .. thank you ...</p>
  
  <pre><code>String sql = "INSERT INTO contacts (first_name, last_name, photo) values (?, ?, ?)";
  PreparedStatement statement = db.con.prepareStatement(sql);
  statement.setString(1, firstName);
  statement.setString(2, lastName);
  
  if (inputStream != null) {
      statement.setBlob(3, inputStream);
  }
  int row = statement.executeUpdate();
  </code></pre>