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 6992319
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T19:37:07+00:00 2026-05-27T19:37:07+00:00

I am trying to import a CSV file into a MySQL 5.1 database. The

  • 0

I am trying to import a CSV file into a MySQL 5.1 database.

The script for creating the table is:

CREATE TABLE `session_hdr` (
  `id` bigint(20) unsigned NOT NULL,
  `type` smallint(5) unsigned NOT NULL,
  `session_start_time` decimal(20,8) unsigned DEFAULT NULL,
  `session_end_time` decimal(20,8) unsigned DEFAULT NULL,
  `session_last_update_time` decimal(20,8) unsigned DEFAULT NULL,
  `session_flag` tinyint(3) unsigned DEFAULT NULL,
  `version` tinyint(3) unsigned DEFAULT NULL,
   PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1$$

This is the data I am tyring to import into the session_hdr table:

0X10004299300,1,7,1324542626.182691780,0.0,1324542627.76399180,1,3
0X1000429BF00,1,7,1324542656.188777040,0.0,1324542657.136454760,1,3
0X1000429CB00,1,7,1324542663.269024060,0.0,1324542663.292035400,1,3
0X1000429F200,1,7,1324542686.177864720,0.0,1324542687.45881600,1,3
0X100042A4000,1,7,1324542716.178234960,0.0,1324542717.645671220,1,3
0X100042A6800,1,7,1324542746.173958660,0.0,1324542747.66159900,1,3
....

The command I am using is to import is:

mysqlimport --ignore-lines=1 -c id,type,session_start_time,session_end_time,session_last_update_time,session_flag,version databaseName1 session_hdr.csv

When I execute the command I reveive the following message:

mysqlimport: Error: 1265, Data truncated for column 'id' at row 1, when using table: session_hdr

Does anyone see why the above command would be throwing that error?

  • 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-05-27T19:37:08+00:00Added an answer on May 27, 2026 at 7:37 pm

    In your data, the first colmn’s value do not conform to an int type, which can only contain numbers. You will need to convert the values from hex to int before importing.

    • 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 a CSV file into a MySQL database table. The
I am trying to import a large CSV file into a MySQL database. I
I am writing the following script up import a csv file into a mysql
I am trying to import a txt/csv file into my postgres database from php
I'm trying to import a CSV files into my MySQL table using the following
I am trying to import a .csv file into my database. I am able
I am trying to import a .csv file into my database. I am able
I'm trying to import a very large .csv file (~4gb) into mysql. I was
I'm trying to load data from a CSV file into a MySQL database, and
I am trying to import a large csv file into MySQL. It's about 1.4

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.