Hello all, I am looking for a little insight on how to by pass this
error when running my sctipt... any help is greatly appreciated.

mysqldump: Got error: 1044: Access denied for user 'root'@'localhost' to
database 'information_schema' when using LOCK TABLES


tempDir = "/mnt/dumpspace"
dumpUser = ""
dumpUserPass = ""

if Dir["#{tempDir}/*"] != nil
  puts "exits"
  FileUtils.rm_rf(Dir.glob("/mnt/dumpspace/*"))
else
  puts "doesn't exist, this should never be true!"
end

date = Time.now.strftime("%m%e%g")
puts date
db = Mysql.real_connect('localhost',dumpUser,dumpUserPass)
puts "Server version: " + db.get_server_info
db.query('show databases').each do |db|
  puts " Dumping - " + db[0] + "\n"
  Dir.mkdir("#{tempDir}/#{db[0]}")
  dump = "mysqldump -u #{dumpUser} -p#{dumpUserPass} #{db[0]} >
#{tempDir}/#{db[0]}_#{date}.sql"
  exec dump
end
db.close

-- 
Posted via http://www.ruby-forum.com/.