Importing data in MYsql

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

We're social

Escrow.com
Spaceship
CryptoExchange.com
Domain Recover

NamePros updates

Portfolio sites: new ways to sort, filter and group your domains
Your public portfolio page has a few new tools for visitors. Portfolio: Newest first The sort menu now has "Newest first". It shows the...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back