new to linux, mysql help...

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
pleigh
Forum Contributor
Posts: 445
Joined: Wed Jan 19, 2005 4:26 am

new to linux, mysql help...

Post by pleigh »

i was wondering if i can import to linux my database folder from windows...in my linux, i installed xampp to easily configure mysql/php/apache...and in the phpMyAdmin, there are 4 default databases cdcol, mysql,phpmyadmin and test...unfortunately, upon browsing my linux, i can't see where the folder of these 4 databases are located so that i can copy my own database folder and hope that i can import my own database from windows to linux...if importing is not possible, i just would like to know where can i find the location of the database folders that i will be creating...thanks in advance.. :)
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

yarrr, 'tis as simple as exportin' from Windows an' importin' ta linuch.


yar.
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

Probably your easiest solution would be to just dump the database. In Linux you can call

Code: Select all

mysqldump -u root -ppassword_here database_name > /location/you/want/for/dump
I'd imagine there's something similar in the Windows installation of MySQL.

To import that dump file into your Linux server, it's as easy as calling:

Code: Select all

mysql -u root -ppassword_again database_name_again < /location/of/dump/file
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
ryanlwh
Forum Commoner
Posts: 84
Joined: Wed Sep 14, 2005 1:29 pm

Post by ryanlwh »

You have phpMyAdmin in your Windows server. You can use that to dump the data to a file (dump them as SQL statements, NOT csv), upload it to a folder in Linux server, and do the importing call pickle provided.
Post Reply