NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page importing data in MYsql

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

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 07-31-2003, 09:11 PM THREAD STARTER               #1 (permalink)
New Member
Join Date: May 2003
Posts: 19
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 08-01-2003, 12:10 AM   #2 (permalink)
Senior Member
Join Date: May 2003
Posts: 2,187
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, 02:13 AM   #3 (permalink)
Senior Member
Join Date: Aug 2002
Posts: 1,255
deadserious has a spectacular aura aboutdeadserious has a spectacular aura about
 



Re: importing data in MYsql


Quote:
Originally posted by shakim
????: NamePros.com http://www.namepros.com/programming/15080-importing-data-in-mysql.html

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, 02:28 PM THREAD STARTER               #4 (permalink)
New Member
Join Date: May 2003
Posts: 19
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, 03:16 PM   #5 (permalink)
Senior Member
Join Date: Aug 2002
Posts: 1,255
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, 04:39 PM THREAD STARTER               #6 (permalink)
New Member
Join Date: May 2003
Posts: 19
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, 04:46 PM   #7 (permalink)
Senior Member
Join Date: Aug 2002
Posts: 1,255
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


Liquid Web Smart Servers  
All times are GMT -7. The time now is 12:44 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger