Re: I NEED HELP ON 'SOURCE(\.) MYSQL

2010-02-01 Thread sureshkumarilu
Give the ful path of file name with in '' and try it out 

Thanks
Suresh Kuna
MySQL DBA
--Original Message--
From: Colin Streicher
To: mysql@lists.mysql.com
Cc: kebede teferi
ReplyTo: co...@obviouslymalicious.com
Subject: Re: I NEED HELP ON 'SOURCE(\.) MYSQL
Sent: Feb 2, 2010 7:33 AM

what everyone else said... also, is there a longer version of the error? or is 
it literally error 2 
or error 22?

Colin

On February 1, 2010 06:38:08 pm kebede teferi wrote:
> Hi, I'm very new to this and I need help.
> 
> What I want to do is to execute a source command statement from cmd to
>  create tables and populate them on a data base that I created in Mysql. 
>  Here is what I did at CMD: *I changed the directory from c:\> to mysql
> *At mysql prompt i used -u root -p that prompted me to give my password.
> *I put in my password and I was allowed to access the mysql server.
> *I used the 'the use --database' command and I can see the database I
>  created is active and waiting to be worked on. *then to run the script
>  which is on a note pad with the name create and file type: sql I typed the
>  following at the mysql prompt: *source create.sql;
>   I get the error message '2' and '22' whichever way I tried the source
>  command.  I appreciate your help
> 
> Kebede Teferi
> 

-- 
Your love life will be happy and harmonious.

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=sureshkumar...@gmail.com



Sent from BlackBerry® on Airtel

Re: I NEED HELP ON 'SOURCE(\.) MYSQL

2010-02-01 Thread Colin Streicher
what everyone else said... also, is there a longer version of the error? or is 
it literally error 2 
or error 22?

Colin

On February 1, 2010 06:38:08 pm kebede teferi wrote:
> Hi, I'm very new to this and I need help.
> 
> What I want to do is to execute a source command statement from cmd to
>  create tables and populate them on a data base that I created in Mysql. 
>  Here is what I did at CMD: *I changed the directory from c:\> to mysql
> *At mysql prompt i used -u root -p that prompted me to give my password.
> *I put in my password and I was allowed to access the mysql server.
> *I used the 'the use --database' command and I can see the database I
>  created is active and waiting to be worked on. *then to run the script
>  which is on a note pad with the name create and file type: sql I typed the
>  following at the mysql prompt: *source create.sql;
>   I get the error message '2' and '22' whichever way I tried the source
>  command.  I appreciate your help
> 
> Kebede Teferi
> 

-- 
Your love life will be happy and harmonious.

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: I NEED HELP ON 'SOURCE(\.) MYSQL

2010-02-01 Thread Carlos Proal

Error 2 is  "No such file or directory"

So, probably the file is not in the right path or you need to explicitly 
provide the path to the file.


Carlos


On 2/1/2010 5:38 PM, kebede teferi wrote:

Hi, I'm very new to this and I need help.

What I want to do is to execute a source command statement from cmd to create 
tables and populate them on a data base that I created in Mysql.  Here is what 
I did at CMD:
*I changed the directory from c:\>  to mysql
*At mysql prompt i used -u root -p that prompted me to give my password.
*I put in my password and I was allowed to access the mysql server.
*I used the 'the use --database' command and I can see the database I created 
is active and waiting to be worked on.
*then to run the script which is on a note pad with the name create and file 
type: sql I typed the following at the mysql prompt:
*source create.sql;
   I get the error message '2' and '22' whichever way I tried the source 
command.  I appreciate your help

Kebede Teferi





   



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: I NEED HELP ON 'SOURCE(\.) MYSQL

2010-02-01 Thread John List

On 02/01/2010 06:38 PM, kebede teferi wrote:

Hi, I'm very new to this and I need help.

What I want to do is to execute a source command statement from cmd to create 
tables and populate them on a data base that I created in Mysql.  Here is what 
I did at CMD:
*I changed the directory from c:\> to mysql
*At mysql prompt i used -u root -p that prompted me to give my password.
*I put in my password and I was allowed to access the mysql server.
*I used the 'the use --database' command and I can see the database I created 
is active and waiting to be worked on.
*then to run the script which is on a note pad with the name create and file 
type: sql I typed the following at the mysql prompt:
*source create.sql;
  I get the error message '2' and '22' whichever way I tried the source 
command.  I appreciate your help

Kebede Teferi
  


mysql looks in the current directory for the source file. That the 
directory where you ran the mysql client from. The quickest fix is to 
give the complete path to the file, e.g. source /home/me/mysourcefile.sql


(You say yoiu changed your current directory to mysql but didn't give us 
the complete path. There are multiple mysql directories in most 
configurations.)


--John






  
  



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: I NEED HELP ON 'SOURCE(\.) MYSQL

2010-02-01 Thread Jesper Wisborg Krogh
How did you type the source command? Did you remember not to quote the file 
name? E.g.

mysql> SOURCE schema.sql

is the correct way.

Jesper

On Tue, 2 Feb 2010 10:38:08 kebede teferi wrote:
> Hi, I'm very new to this and I need help.
>
> What I want to do is to execute a source command statement from cmd to
> create tables and populate them on a data base that I created in Mysql. 
> Here is what I did at CMD: *I changed the directory from c:\> to mysql
> *At mysql prompt i used -u root -p that prompted me to give my password.
> *I put in my password and I was allowed to access the mysql server.
> *I used the 'the use --database' command and I can see the database I
> created is active and waiting to be worked on. *then to run the script
> which is on a note pad with the name create and file type: sql I typed the
> following at the mysql prompt: *source create.sql;
>   I get the error message '2' and '22' whichever way I tried the source
> command.  I appreciate your help
>
> Kebede Teferi


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



I NEED HELP ON 'SOURCE(\.) MYSQL

2010-02-01 Thread kebede teferi
Hi, I'm very new to this and I need help.

What I want to do is to execute a source command statement from cmd to create 
tables and populate them on a data base that I created in Mysql.  Here is what 
I did at CMD:
*I changed the directory from c:\> to mysql
*At mysql prompt i used -u root -p that prompted me to give my password.
*I put in my password and I was allowed to access the mysql server.
*I used the 'the use --database' command and I can see the database I created 
is active and waiting to be worked on.
*then to run the script which is on a note pad with the name create and file 
type: sql I typed the following at the mysql prompt:
*source create.sql;
  I get the error message '2' and '22' whichever way I tried the source 
command.  I appreciate your help

Kebede Teferi