Getting shell access for MySQL working on XAMPP 1.5.1

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

Getting shell access for MySQL working on XAMPP 1.5.1

Postby zeeforel » 29. March 2006 09:20

Moved from German forum

Hi to you all,

This one is in English, if you do not mind. My German is not so good, at least not for these purposes.

I have XAMPP 1.5.1 installed and working perfectly (e.g. with MediWiki).

Now I want to upload a big .sql file into MySQL (18MB), but in MyPHPAdmin this fails (too big file), so I want to try to use the shell access to MySQL.

I am not possible to get this shell access to MySQL working. I can not get access through /xampp/mysql/bin/mysql!

How can I get shell access to MySQL, starting from a working version of XAMPP1.5.1?

Many thanks in advance.

Best regards,
Marcel
zeeforel
 
Posts: 7
Joined: 29. March 2006 07:21
Location: Netherlands

Postby WorldDrknss » 29. March 2006 09:36

go to start run
type cmd
click ok

type the following:
cd..
cd..
cd xampp
cd mysql
cd bin
mysqlimport -u username -p database /path/to/databasename.type
or
mysqlimport -u username -p password database /path/to/databasename.type

http://xampptutorials.com
User avatar
WorldDrknss
 
Posts: 292
Joined: 17. September 2005 13:40

Postby zeeforel » 29. March 2006 09:42

Thanks,

I will try it this evening.

Do I first need to shut down the Apache and MySQL services through the XAMPP panel or should they be live when doing the import?

Thanks again.
zeeforel
 
Posts: 7
Joined: 29. March 2006 07:21
Location: Netherlands

Postby zeeforel » 29. March 2006 09:50

By the way,

May be a stupid question but where do I find:
+ username
+ password

I did not provide this during the XAMPP install.

Should it be a username connected to the database I want to import via the .sql file?

Thanks
zeeforel
 
Posts: 7
Joined: 29. March 2006 07:21
Location: Netherlands

Postby WorldDrknss » 29. March 2006 10:44

user name will be root and password would be what you had defined in the security settings under http://localhost, if you did not set that you dont need to use a password.
User avatar
WorldDrknss
 
Posts: 292
Joined: 17. September 2005 13:40

Postby Wiedmann » 29. March 2006 11:37

Please no crossposts

May be a stupid question but where do I find:
+ username
+ password

In the readme?


I can not get access through /xampp/mysql/bin/mysql!

Why not? If you have a problem with it, please post an error message.

Do I first need to shut down the Apache and MySQL service

no. How wil you contact the MySQL server if you shut down it first?


BTW:
You have read the MySQL doku about this program (mysql.exe)?

BTW:
mysqlimport -u username -p database /path/to/databasename.type

"mysqlimport" is the wrong program to import a sql file.
Last edited by Wiedmann on 29. March 2006 11:41, edited 1 time in total.
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby zeeforel » 29. March 2006 11:39

What about Apache and MySQL services: should it be "live" or not?

Where do I find that username?
zeeforel
 
Posts: 7
Joined: 29. March 2006 07:21
Location: Netherlands

Postby zeeforel » 29. March 2006 11:59

Wiedmann,

Thanks for the reaction. I will look up the info in the documents.
zeeforel
 
Posts: 7
Joined: 29. March 2006 07:21
Location: Netherlands

Postby Zenzoom » 30. March 2006 00:46

Did you got your 18mb restored? If not, you could use bigdum.php to do it. It's a great tool and I used a couple of times with large DBs on phpBB.
Zenzoom
 
Posts: 1
Joined: 30. March 2006 00:37

Postby zeeforel » 30. March 2006 06:42

The command:

Code: Select all
mysql/bin>mysql -u root namedatabase < namebackupfile.sql


worked like a charm.

Btw. there was no password to the database only the username "root".
zeeforel
 
Posts: 7
Joined: 29. March 2006 07:21
Location: Netherlands

Use windows path

Postby Roberto Trama » 30. March 2006 12:01

Why do not use the windows PATH command to add in your path the mysql/bin directory? So you will be able to call the mysql shell from whatever folder you need. This should be very useful to organize folders where to write or edit the bulk files to load into mysql tables through the LOAD DATA INFILE command

Bye
Roberto
Roberto Trama
 
Posts: 2
Joined: 30. March 2006 11:52

Postby WorldDrknss » 30. March 2006 13:26

Just want to clear this up so people dont get confused.

mysqlimport are for .txt, .csv
mysql are for .sql

Wiedmann is correct and I should have read the post more closely and didn't even realized he even metioned the file type.

@zeeforel - sorry I should have read it closely
http://wdguides.org - XAMPP Tutorials & MORE!!!!
User avatar
WorldDrknss
 
Posts: 292
Joined: 17. September 2005 13:40


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 50 guests