Connecting Tech Pros Worldwide Forums | Help | Site Map

How to run sql script on MySQL 5.1.34 prompt.

Newbie
 
Join Date: Jun 2009
Posts: 19
#1: Oct 7 '09
Hi,

Can you please tell me how to run the sql script on mysql prompt?

I tried the command but not succesfull.
C:\MySQl\bin:> mysql --u=root --p=amit < mysql.sql

C:\MySQl\bin:>source < MySQL51amit_CL_Inst_1.txt

Atli's Avatar
Moderator
 
Join Date: Nov 2006
Location: Iceland
Posts: 3,748
#2: Oct 21 '09

re: How to run sql script on MySQL 5.1.34 prompt.


Hey.

Your first attempt was close.
However, the --u parameter is to vague, like the error it gives says:
Quote:
mysql: ambiguous option '--u=root ' (unbuffered, user)
It could refer to either "user" or "unbuffered".

You just need to be more specific:
Expand|Select|Wrap|Line Numbers
  1. mysql --user=root --password=amit < mysql.sql
That should work.
Reply


Similar MySQL Database bytes