Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8975507
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T18:54:01+00:00 2026-06-15T18:54:01+00:00

I am trying to import my data form text file into mysql database. I

  • 0

I am trying to import my data form text file into mysql database. I used the LOAD DATA INFILE statement but it does not work successfully.

My text file is as follows with fields terminated by ‘\t’ and lines terminated by ‘\n’:

2102308562  2102298734  2   75
2102308562  2409206932  2   15
2102308562  1706425142  2   9
2102308562  2817061695  2   6
2102308562  1738818365  2   52
2102308562  2102304314  2   16
2102308562  1732994262  2   2
2102308562  1952263417  2   1

The table I want to insert is defined by the following statement:

CREATE TABLE `t_user_action` (
    `Subject_user_id` INT(32) UNSIGNED NOT NULL COMMENT ,
    `Object_user_id` INT(32) UNSIGNED NOT NULL COMMENT ,
    `Action_id` INT(32) UNSIGNED NOT NULL COMMENT ,
    `Action_count`  INT(32) UNSIGNED NOT NULL COMMENT ,
    PRIMARY KEY (`Subject_user_id`,`Object_user_id`,`Action_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

My import statement is like that:

LOAD DATA INFILE 'UserRetweet.txt' INTO TABLE t_user_action CHARACTER SET utf8

My problem is that after the load data infile statement executed. The value of the first column in the first row becomes 0, but other values are right.

I’ve searched on the Internet and can not get a solution! Thanks for any advice!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T18:54:02+00:00Added an answer on June 15, 2026 at 6:54 pm

    You probably have Byte Order Mark at the beginning of your UTF-8 file.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to import data from excel file (.xlsx) into sql database, my
I’m trying to import fixed width data from text file into SQL Server Express
So I'm trying to import some sales data into my MySQL database. The data
I am trying to import an excel file into a data table using GemBox
I am trying to import a csv file to insert data into an existing
I am trying to build a import form for a CSV file into the
Trying to use 'LOAD DATA INFILE' in order to populate a database table from
I am trying to import data to an Oracle database. I have .imp and
im trying to import html table data to an excel file and have succeeded
I'm trying to import a cython module data.pyx into another cython module user.pyx. Everything

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.