It is possible to method to export the outcomes from Pig straight to a database like mysql?

While bearing in mind what orangeoctopus stated (watch out for Web sites...) perhaps you have were built with a turn to DBStorage?

data = LOAD '...' AS (...);
...
STORE data INTO DBStorage('com.mysql.jdbc.Driver', 'dbc:mysql://host/db', 'INSERT ...');

The primary problem I see is the fact that each reducer is effectively likely to place in to the database around the same time frame.

If you do not think this is an problem, It is best to write a custom Storage method that utilizes JDBC (or something like that similar) to place in to the database directly and writing nothing to HDFS.

If you're scared of carrying out a Web sites attack by yourself database, possibly collecting the information on HDFS and carrying out another bulk load into mysql could be better.

I am presently experimentation by having an embedded pig application which loads results into mysql via PigServer.OpenIterator along with a JDBC connection. It's labored perfectly in testing, however i haven't attempted it at scale yet. This is comparable to the custom storage method already recommended, but runs from one point, so no accidental Web sites attack. You effectively finish up having to pay the network transfer cost two times (cluster -> staging machine, staging machine -> DB server) if you do not run the burden from the DB server (Personally, i would rather run nothing except the DB itself from the DB server), but that is the same as the "write the file out and bulk load it" option.

Use Sqoop