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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T18:54:19+00:00 2026-05-31T18:54:19+00:00

i am new to the databases and i recently downloaded mysql 5.1 and learning

  • 0

i am new to the databases and i recently downloaded mysql 5.1 and learning the commands from a website. i am not able to insert the data from a file into a database. i am using the command line and typed the same command from
http://www.webdevelopersnotes.com/tutorials/sql/mysql_course_inserting_data_in_mysql_tables.php3
but it was issuing an error.. i am using windows 7.. is the file format not supported ? or the command is wrong? please help… thanks in advance
the file name is “nit.dat”… created the database named ‘nitish’ and a table inside it named ‘stud’ now i typed
mysql nitish < nit.dat ;
at the command line… and i kept the file nit.dat in the bin directory…. the file contains three records to be inserted…..

insert into stud ( id, name, age ) values ( 99, “nit”, 23);
insert into stud ( id, name, age ) values (22, “nit22”, 12);
insert into stud ( id, name, age ) values (10, “nit10”, 56);

i am prompted with an error message showing…

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'mysql
nitish < nit.dat' at line 1
…. what to do?

  • 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-31T18:54:21+00:00Added an answer on May 31, 2026 at 6:54 pm

    Hmmm..I think I got it. Are you running MySQL already before executing that statement? In that case, the command fails. You need not have to connect to mysql and execute that query.
    Refer this. The command is correct and it should work if the text file contains the INSERT query you have specified. If there is anything more then because of those query it should fail.

    If you are a MySQL beginner you could try GUI tools where you don’t have to worry about commands 🙂 Read this. You could try SQLyog which is simple and efficient.

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

Sidebar

Related Questions

I recently moved a bunch of tables from an existing database into a new
I am somewhat new to MySQL (come from MS SQL) and have recently come
I'm very new to working with databases in C# (but not C# itself) and
So there's this new cool thing, these NoSQL-databases. And so there's my data: Rows
I need to copy about 40 databases from one server to another. The new
I recently got a new dedicated MySQL machine. Now it's running fine, but sometimes
Our IT department recently moved from our databases to a cluster. This move broke
I'm one of those that recently decided to migrate from MySQL to PostgreSQL and
I have recently switched jobs and at this new company we are using MySQL.
We recently put a new production database into use. The schema of this database

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.