[advanced search]
 

Go Back   NamePros.com > Discussion > Web Design & Development > Programming

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.


Closed Thread
 
LinkBack Thread Tools
Old 07-31-2003, 08:11 PM   #1 (permalink)
New Member
 
Join Date: May 2003
Posts: 19
31.00 NP$ (Donate)

shakim is an unknown quantity at this point


importing data in MYsql

am new a MYSQL. I have been using Access. Now, I am converting to MYSQL. I got a tool that takes a Access file and converts it to a dump file call "filename.sql" Now how do I import that into MYSQL? After logging into mysql what should I do next and what is the command to import this file? Also, I tried using PHPMYadmin. Because this is a huge file (50,000 records) it times out. So is there a way I can adjust the time so it doesn't time out. I want to learn how to do this both ways. via the command line and via phpmyadmin. thanx. Am example of the command line would be great.

I log into mysql, I get this promt "MYSQL>" Now what do I type? My data file is located at "c:/data.sql"
__________________
"Knowledge Speaks and Wisdom Listens"
shakim is offline  
Old 07-31-2003, 11:10 PM   #2 (permalink)
Senior Member
 
Join Date: May 2003
Posts: 2,211
6,170.25 NP$ (Donate)

adam_uk is a jewel in the roughadam_uk is a jewel in the roughadam_uk is a jewel in the rough

Breast Cancer
find a utility to split files up split the file up so each segment is just under a meg each

then execute them in phpmyadmin

i had to restore a phpbb forum and i had to break the file up and a meg of sql query is handled fine by phpmyadmin
adam_uk is offline  
Old 08-01-2003, 01:13 AM   #3 (permalink)
Senior Member
 
Join Date: Aug 2002
Posts: 1,300
2.85 NP$ (Donate)

deadserious has a spectacular aura aboutdeadserious has a spectacular aura about


Re: importing data in MYsql

Quote:
Originally posted by shakim

I log into mysql, I get this promt "MYSQL>" Now what do I type? My data file is located at "c:/data.sql"
Code:
cd c:mysqlbin
mysql -uSqlUser -p DBNAME < c:data.sql
That should work.
deadserious is offline  
Old 08-01-2003, 01:28 PM   #4 (permalink)
New Member
 
Join Date: May 2003
Posts: 19
31.00 NP$ (Donate)

shakim is an unknown quantity at this point


My MYSQL is located on a server not on my local machine. Will that make a difference. Because I log into mysql via telnet.
__________________
"Knowledge Speaks and Wisdom Listens"
shakim is offline  
Old 08-01-2003, 02:16 PM   #5 (permalink)
Senior Member
 
Join Date: Aug 2002
Posts: 1,300
2.85 NP$ (Donate)

deadserious has a spectacular aura aboutdeadserious has a spectacular aura about


It should be just the same.

You can also do it without changing to the mysql directory:
Code:
c:pathtomysql -uSqlUser -p DBNAME < c:data.sql
You used a forward slash above, but I figured it would actually be a backslash since you're on a windows machine, but if you're logging into a server it may be forward slash. Just make sure you have the paths right and it should all work the same as long as you have permission to run it.
deadserious is offline  
Old 08-01-2003, 03:39 PM   #6 (permalink)
New Member
 
Join Date: May 2003
Posts: 19
31.00 NP$ (Donate)

shakim is an unknown quantity at this point


Just ot be clear.

My MYSQL is running on a server. And my data file is located on my local machine.

1. I log into the server using telnet.
2. I am at the $ promt.
3. Type "mysql -uSqlUser -p DBNAME < c:data.sql"

I don't need to ftp the data.sql file to the server first!
__________________
"Knowledge Speaks and Wisdom Listens"
shakim is offline  
Old 08-01-2003, 03:46 PM   #7 (permalink)
Senior Member
 
Join Date: Aug 2002
Posts: 1,300
2.85 NP$ (Donate)

deadserious has a spectacular aura aboutdeadserious has a spectacular aura about


Yes you need the file to be on the same server first.
deadserious is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Site Sponsors
Advertise your business at NamePros

All times are GMT -7. The time now is 11:54 AM.


Powered by: vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Template-Modifications by TMS
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85