Portal Home > Knowledgebase > Articles Database > How to Import a .sql file to a clean database. help


How to Import a .sql file to a clean database. help




Posted by pedrojose, 09-04-2008, 10:41 PM
hello Im trying to install Magento online store at my server, but before i start the install i want to import a demo sample database so that the store comes with example template products. I have already search on magento instalation guide, but i dont understand, So can anyone, please tell me how do i by FTP or Plesk, can import a .sql file into a clean database? If you have time please tell me step by step. thanks

Posted by jseymour, 09-04-2008, 11:31 PM
Not sure if this is what you want, read this article: MySQL Database Restore if you are importing data into an existing database use the insert command. phpmyadmin would be the easiest to use for this. But....most installers that have sample data will give you the option to populate the database with the sample data during install. Did you perhaps miss it?

Posted by oliviakitty, 09-04-2008, 11:37 PM
I don't know if you can use PHPMyAdmin through Plesk or FTP (cPanel X user here) But, I second the vote for PHPMyAdmin... All you have to do is upload the file

Posted by WPSensei, 09-05-2008, 12:15 AM
It depends on the size of your MySQL database to be honest. If you have a decent sized MySQL database, phpMyAdmin probably isn't going to cut it and may time-out before all of the data is imported. The safest way to import a MySQL database is using SSH. Not only is it safer, it's much quicker and more efficient. You won't be able to directly import the database using FTP or Plesk so to speak.

Posted by JLHC, 09-05-2008, 03:40 AM
Magento's database isn't that big. You should be able to import it without any issues. Do you have phpMyAdmin or any other database tool with Plesk? I also suggest you to head over to the Magento forum as you can get more help there.

Posted by activelobby4u, 09-05-2008, 06:38 AM
actually you can do it with the aid of your support guys. the steps involved are 1. rm -rf /var/lib/mysql/db_name/* 2. mysql db_name < .sqlfile



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
UK / Euro reseller (Views: 602)