database - How can I prepare the logs or textfiles to be read by MySQL using Load DATA INFILE INTO? -
What is the best way to prepare a log file before inserting your values into a MySQL database
LOAD DATA INFILE '/tmp/somefile.txt' in the table
How can I make sure and create a data log file for reading through such commands Am I Someone told me using scripting (using Said, GRP, cat, sub ...) How can I do this or what are the tools?
I know how to insert a file so that MySQL can read it, but I want to know how to organize it and prepare your content for it.
You can use Excel to setup your CSV file correctly, or openoffice Calc can also do it.
Do not have access to phpMyAdmin? This will make your job a little easier. Try to do a Google search for "Mysql Import CSV". This should give you some information about your file layout.
When I remembered using it phpMyAdmin, you can get your data in 1 of 2 ways depending on your import settings.
column_name_1 | Column_name_2 | Column_name_3 value1_1 | Value 1_2 | Value1_3 value2_1 | Value 2_2 | column_name_1, column_name_2, column_name_3 value1_1, value1_2, value1_3 value2_1, value2_2, value2_3
for this your CSV
OR
value1_1 | Value 1_2 | Value1_3 value2_1 | Value 2_2 | Value2_3 I hope that helps.
Comments
Post a Comment