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

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 15th, 2000, 10:03 AM
seanma seanma is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2000
Location: Web Developer
Posts: 6 seanma User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hi, dear friends, i was going to transform the M.S.Access database into MySQL format and now I have got the text file which is full of 'INSERT()' SQL statement already. Now the question is how to execute the statements file in MySQL?

I tried some windows-shared version of MySQL, there is a command named "source", which can execute a statements file easily. But with the version provided by my ISP, i can not find out that command? I think there should be some ways to do it. but how?

Then I tried to create the DB structure in MySQL firstly and exported the M.S.Access database into "tab eliminates" or "commar eliminates" files or something like that, then I tried to use "load" command in MySQL,
like: load data infile '****' into table ***, but the error mesag is "ACCESS DENIED FOR USER: ****@LOCALHOST (USING PASSWORD: YES)"

so what does it mean? what is the comman way after you guys get the query statemenets file from some converting program?

Sorry to bother you, thanks a lot.

Reply With Quote
  #2  
Old September 16th, 2000, 10:17 AM
woodgnome woodgnome is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Posts: 29 woodgnome User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 m 43 sec
Reputation Power: 0
One way of moving data from Access to MySQL is by creating an ODBC connection between the two databases. If you have already created the tables in MySQL it is then very easy to write Access append queries to populate them. There are many good articles on the web about how to do this.

You will need to start by downloading MyODBC from the php site.

Reply With Quote
  #3  
Old September 17th, 2000, 09:13 AM
Sepodati's Avatar
Sepodati Sepodati is offline
Banned
Dev Shed God 19th Plane (14000 - 14499 posts)
 
Join Date: Dec 1999
Location: Afghanistan
Posts: 14,381 Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)  Folding Points: 70626 Folding Title: Intermediate FolderFolding Points: 70626 Folding Title: Intermediate FolderFolding Points: 70626 Folding Title: Intermediate FolderFolding Points: 70626 Folding Title: Intermediate Folder
Time spent in forums: 2 Months 4 Weeks 7 h 28 m 9 sec
Reputation Power: 1784
Send a message via ICQ to Sepodati Send a message via Yahoo to Sepodati
If your file is all INSERT statements, then it's real easy to get it into mysql. First make sure the database and table are created in mysql to hold the data. then just use:
mysql -uuser -p database < yourfilename

sometimes the files have the create definetion for the table in them, also. if it does, then all you have to do is create the database. hope that helps.

---John Holmes...

Reply With Quote
  #4  
Old September 18th, 2000, 09:20 AM
seanma seanma is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2000
Location: Web Developer
Posts: 6 seanma User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks so much, it is working very well!

<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by SepodatiCreations:
If your file is all INSERT statements, then it's real easy to get it into mysql. First make sure the database and table are created in mysql to hold the data. then just use:
mysql -uuser -p database < yourfilename

sometimes the files have the create definetion for the table in them, also. if it does, then all you have to do is create the database. hope that helps.

---John Holmes...
[/quote]


Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMySQL Help > such a naive question, how to execute SQL statement file in mysql?


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 4 hosted by Hostway