title: RMySQL is finished uploading data; MySQL takes days for it to appear
body: <p>I have a system uploading data from Twi tter's Streaming API to a MySQL database in two steps: </p>
  
  <p>1) I have data coming in from R to two separate files a day, an AM file and PM file, via code adapted from streamR. </p>
  
  <p>2) Twice a day, I have the data parsed and organized in R, and then uploaded to a MySQL database using RMySQL. </p>
  
  <p>There is a lag in the data showing up in MySQL - by 2-3 days, and this lag seems to keep increasing. RMySQL returns "DONE" after uploading, but the data are not queryable until a few days later. My collaborators pride themselves on real-time analysis of tweet data, so this is a nuisance. </p>
  
  <p>Parsing/uploading code: </p>
  
  <pre><code> library(streamR)
      tweets&lt;-parseTweets("parse/after12.json")
  
      #clean data so that mysql doesnt freak
  
      cleanText &lt;- function(text_vector){
        text_vector&lt;-sapply(text_vector, function(x) gsub("\'","\"",x))
        text_vector&lt;-sapply(text_vector, function(x) gsub("[\b\t\n]"," ",x))
        return(text_vector)       
      }
  
      tweets[,1:length(tweets)]&lt;-cleanText(tweets[,1:length(tweets)])
  
      #change date data to a format mysql can read
      tweets$created_at&lt;-as.POSIXlt(tweets$created_at,  format= "%a %b %d %X %z %Y",tz="UTC")
  
  library(chron)
  library(RMySQL)
  
  # Establish connection to database
  mgr &lt;- dbDriver("MySQL")
  mycon &lt;- dbConnect(mgr, user="user", host="name", dbname="dbname", password="pwd")
  
  currentTime&lt;-Sys.time()
  currentDate&lt;-unlist(lapply(strsplit(as.character(currentTime), " "), function(x) x[1]))
  currentDate&lt;-unlist(lapply(strsplit(as.character(currentDate), "-"), function(x) x[1:3]))
  
  
  tableDate&lt;-paste(currentDate[1], currentDate[2], sep="_") # to load into
  
  dbWriteTable(mycon, paste("data_", tableDate, sep=""), tweets1, row.names=FALSE, append=T)
  
  #upload complete
  </code></pre>
  
  <p>Also not that there is no indication that a process is running on the machine that holds the mysql database when this lag happens. </p>
  
  <p>Any suggestions would be appreciated!</p>