Forum Discussion

hammerite_35077's avatar
hammerite_35077
Icon for Nimbostratus rankNimbostratus
Mar 19, 2008

Upload Virtuals & data to MYsql DB

I'm looking for a simpler way to upload the output from `b virtuals` to a MYsql DB. It's almost similar to XML output but I dont think I want to parse it out with XPATH/XSLT and translate it into XML only to have to parse XML with perl to upload to a DB. Does anyone have any bright ideas?
  • In theory if you have the MySQL binaries on the F5 you could "mysql -uroot -pyourpass" and then execute the following command, but change it match your needs

     

    mysql> LOAD DATA LOCAL INFILE '/path/to/file.txt' INTO TABLE your-table-name;

     

     

     

    If MySQL binaries cannot happen on the F5, then you could log into the MySQL database and have a shell script that logs into the F5 and runs the 'b virtuals' command and outputs to a text file. Same script also copies the file back to MySQL Database server then you can run the command above.

     

     

     

    Hope that helps

     

    /CB

     

  • Unfortunately the binaries are not in place. I'll have to figure out some other solution, thank you though!

     

     

    -AS