MySQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMySQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old May 15th, 2005, 04:48 AM
daidalus13 daidalus13 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 16 daidalus13 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 12 m 51 sec
Reputation Power: 0
fail to run batch file

Hi,

I am running server version: 4.0.20a-nt
on Win XP pro.

I am trying to run a batch file called 'lists.sql' from the mysql prompt as follows:

mysql> source lists.sql

I get the following error message:

ERROR:
Failed to open file 'lists.sql', error: 2

My file is saved in the following directory:
D:\MySQL\

My basedir is d:\MySQL\
I verified this by running the 'show variables' command which returned the following:

mysql> SHOW GLOBAL VARIABLES like 'basedir';
+---------------+-----------+
| Variable_name | Value |
+---------------+-----------+
| basedir | D:\MySQL\ |
+---------------+-----------+
1 row in set (0.00 sec)

Does anybody know why my batch file is not found? Should I place the batch file somewhere else and not in the basedir?

Any help much appreciated.
Thanks.
Daidalus13

Reply With Quote
  #2  
Old May 15th, 2005, 09:28 PM
Madpawn Madpawn is offline
My beat is correct.
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 339 Madpawn User rank is Private First Class (20 - 50 Reputation Level)Madpawn User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 2 Days 22 h 3 m 33 sec
Reputation Power: 4
Have you tried specifying the entire path in your source command?
__________________
"A pawn is the most important piece on the chessboard -- to a pawn"


Reply With Quote
  #3  
Old May 16th, 2005, 12:28 PM
daidalus13 daidalus13 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 16 daidalus13 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 12 m 51 sec
Reputation Power: 0
Yes I did. Here is what I got:

mysql> source `d:\mysql\lists.sql`;
ERROR:
Failed to open file '`d:\mysql\lists.sql`', error: 22

here is what perror returned:
Illegal error code: 22

Any ideas?

Reply With Quote
  #4  
Old May 16th, 2005, 01:58 PM
Madpawn Madpawn is offline
My beat is correct.
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 339 Madpawn User rank is Private First Class (20 - 50 Reputation Level)Madpawn User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 2 Days 22 h 3 m 33 sec
Reputation Power: 4
Remove the backticks, and you should be fine.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMySQL Development > fail to run batch file


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway