Dynadot Aftermarket: discover domain gems worth investing in. Visit our aftermarket.

Importing data in MYsql

SpaceshipSpaceship
Namecheap AuctionsNamecheap Auctions
Namecheap AuctionsNamecheap Auctions
Watch

shakim

Established Member
Impact
0
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"
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
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
 
0
Close
Re: importing data in MYsql

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.
 
0
Close
My MYSQL is located on a server not on my local machine. Will that make a difference. Because I log into mysql via telnet.
 
0
Close
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.
 
0
Close
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!
 
0
Close
Yes you need the file to be on the same server first. :D
 
0
Close
CatchedCatched

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

A browser tab with a favicon next to the page title
Search members
You can now search for members by name, company, location and more. Open the search at the top of any page and choose Members. You will...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back