D&C Lug - Home Page
Devon & Cornwall Linux Users' Group

[ Date Index ][ Thread Index ]
[ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Uploading MySQL



On 05/10/04 06:14:03, Richard Brown wrote:
Hi

I have rewritten the emails and put them into two. Here is the first problem I have. I have compiled a sql database on my home computer and now want to load it up to the server. I was told to write a sql query to upload the database. Hence the following. The error message I get follows on from that.

 SQL-query?:?
FILE=rocheafc.sql
NAME=rocheafc
PASS=********
DB=rocheafc

echo "Content-type: text/plain"
echo
echo "Tried to import file: "$FILE

/usr/bin/mysql -u $NAME --password=$PASS $DB < $FILE


MySQL said:


You have an error in your SQL syntax near 'FILE=rocheafc.sql
NAME=rocheafc
PASS=********
DB=rocheafc

echo "Content-ty' at line 1

UKLinux advised me this:-
I've looked at your script and it is failing on two parts.


What is in rocheafc.sql? From the error it looks like it's the above, which is a shell script not sql.


--
'ooroo

Mike...(:)-)
---------------------------------------------------
Email: mike@xxxxxxxxxxxxx        o
You need only two tools.        o /////
A hammer and duct tape. If it    /@   `\  /) ~
doesn't move and it should use  >  (O)  X<  ~  Fish!!
the hammer. If it moves and      `\___/'  \) ~
shouldn't, use the tape.           \\\
---------------------------------------------------

--
The Mailing List for the Devon & Cornwall LUG
Mail majordomo@xxxxxxxxxxxx with "unsubscribe list" in the
message body to unsubscribe.



Lynx friendly