Welcome to my Blog!
Information should be free, accurate, and available. I will be updating this section most often, enjoy!
Various galleries of artwork and photography I have done over the last five years.
Mini scripts I have written and decided to share. Mostly oneliners for managing network and system load.
Software projects are in the works and will be here eventually!
You can contact me through various methods.
This is a quick guide to importing Mysql flat files into a database.
Importing the data
Connecting to the database and importing from mysqldump files
$ mysql -u dbuser -pPassword -o < dbfile.sql $
As long as the .sql file is formatted with commands, the previous line will work just fine. This allows you to simply execute the lines of code from within the file. But what if the file is a CSV file?
$ mysql -u dbuser -pPassword Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 172 mysql> load data local infile 'dbfile.txt' -> into table tblproducts fields terminated by '\t' -> lines terminated by '\n';
This will import the data into the table organized by tabs seperated by new lines.
|
|
With a good conscience our only sure reward, with history the final
judge of our deeds, let us go forth to lead the land we love, asking
His Blessing and his help but knowing that here on earth, God's work
must truly be our own.
-- John F. Kennedy