Logging data to MySQL
Logging data does not only have to be done using commonly used files such as those we have used earlier. In fact, we can even log our data into MySQL databases using the
Net::MySQL Perl module.
Keeping our logs in databases is efficient because of the fact that we have multiple, standardized ways of accessing the data. For instance, we can access it using interpreted web languages such as PHP, from the Linux command-line interface, or, as in our following lesson, using Perl. First, we need to start up a MySQL server. This is an incredibly easy task to do with Linux. The first step is to install the server and give it a root password. With a Debian-based Linux, this can be done using aptitude with the following command: