Import MySQL Command Line

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Import MySQL Command Line

Postby gward » 13. July 2011 17:47

Hello,

I'm trying to import a large database and having no luck... I'm using Cygwin to emulate the command line thing.

After logging into mysql I run this command:

databasename > pathtodatabase/databasedump.sql

Nothing happens. I've also tried importing using phpmyadmin. It keeps saying script timeout pass even though I have max_execution_time = 0 (for unlimited right?)

The database is about 700MB.

Thanks for the help!
gward
 
Posts: 2
Joined: 13. July 2011 17:22

Re: Import MySQL Command Line

Postby Altrea » 13. July 2011 18:32

the best way is to use the MySQL command line tool. => http://www.lullabot.com/blog/importexpo ... -databases

the other possibility is to use import scripts which avoid the timeout, like mysqldumper => http://www.mysqldumper.net/
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11935
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Import MySQL Command Line

Postby gward » 14. July 2011 18:09

Sweet, the method described at the link did the trick.

This set of commands:

SHOW DATABASES;
DROP DATABASE [DBNAME];
CREATE DATABASE [DBNAME];
USE [DBNAME];
SOURCE [/path_to_file/DBNAME].sql;

Thanks!
gward
 
Posts: 2
Joined: 13. July 2011 17:22

Re: Import MySQL Command Line

Postby Altrea » 14. July 2011 21:19

Glad it worked for you :D
You're welcome 8)
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11935
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 116 guests