Open main menu

CDOT Wiki β


SRA840 Lab7

288 bytes added, 17:52, 11 April 2009
7. How will you read records from in a plain text file into MySQL. Give an example.
Copy records to a plain text file:
mysql> select * into outfile '/tmp/database.txt' fields terminated by '\t' lines terminated by '\n' from ''table_name'';
Import records from a plain text file:
mysql> load data infile '/tmp/database.txt' into table ''table_name'' fields terminated by '\t' lines terminated by '\n';
8. What are the exact sequence of steps that you need to take so that Apache logs can be read in from MySQL. Assume you have a default installation of Apache and a default
installation of MySQL.
8.1 Create a database
8.2 Create a table with the fields I will need
8.3 Split the apache log file to a temporary file then mysql can recognize this file
8.4 Import this plain text file into the database
9. Name two security measures that MySQL recommmends
10. Which MySQL log file, in your opinion, is important for you to keep track of and why?
11. As you observe from the tutorials, many users have added their own comments in addition to the MySQL material. Which two comments (one from the using tutorial and one from the administration tutorial) you think were useful to you.