Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problems accessing sql scripts

Status
Not open for further replies.

csphard

Programmer
Apr 5, 2002
194
US
i have scripts on d in a folder called samp_db. at the mysql prompt
mysql> mysql d:\samp_db\insert_president.sql
--------------
C:\MYSQL\BIN\MYSQL.EXE Ver 10.4 Distrib 3.23.14-alpha, for Win95/Win98 (i586)

Connection id: 7
Current database: samp_db
Current user: root@800WIN98
Server version 3.23.36
Protocol version 10
Connection mysql133 via TCP/IP
TCP port 3306
Uptime: 27 min 26 sec

Threads: 3 Questions: 226 Slow queries: 0 Opens: 18 Flush tables: 1 Open ta
bles: 13 Queries per second avg: 0.137
--------------

ERROR: Unknown command '\i'.
->


What am i doing wrong.
 
if you are trying to load a sql script to create tables and fill them with data then you want to do it this from your c: prompt and not your sql shell. Example:

c:\mysql\bin mysqld < d:\samp_db\insert_president.sql

This will load your script file
 
question when i do the following

C:\>cd\mysql\bin mysqld < d:\samp_db\insert_president.sql

i get
Too many parameters - mysqld

when i do the following
C:\mysql\bin> mysqld < d:\samp_db\insert_president.sql

i get
Bad command or file name

sorry but i am still lost.

help
 
Try this:
Code:
C:\> cd mysql\bin
C:\mysql\bin> mysql < d:\samp_db\insert_president.sql
Remember that C:\mysql\bin\mysqld is the server, and C:\mysql\bin\mysql is the client.

-Rob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top