Page 1 of 1

Getting shell access for MySQL working on XAMPP 1.5.1

PostPosted: 29. March 2006 09:20
by zeeforel
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

PostPosted: 29. March 2006 09:36
by WorldDrknss
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

PostPosted: 29. March 2006 09:42
by zeeforel
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.

PostPosted: 29. March 2006 09:50
by zeeforel
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

PostPosted: 29. March 2006 10:44
by WorldDrknss
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.

PostPosted: 29. March 2006 11:37
by Wiedmann
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.

PostPosted: 29. March 2006 11:39
by zeeforel
What about Apache and MySQL services: should it be "live" or not?

Where do I find that username?

PostPosted: 29. March 2006 11:59
by zeeforel
Wiedmann,

Thanks for the reaction. I will look up the info in the documents.

PostPosted: 30. March 2006 00:46
by Zenzoom
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.

PostPosted: 30. March 2006 06:42
by zeeforel
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".

Use windows path

PostPosted: 30. March 2006 12:01
by Roberto Trama
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

PostPosted: 30. March 2006 13:26
by WorldDrknss
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