hts-direct Posted February 20, 2005 Share Posted February 20, 2005 hi all im trying to import my database to my osc on local host. ive exported my database to desktop (saved it as OSC) renamed the database name in the file 'OSC' created a new database in local host called OSC And ive tried and tried to import it but keep getting the error: No SQL query! not sure if anyone could help me at all? thankyou , ash Link to comment Share on other sites More sharing options...
Guest Posted February 20, 2005 Share Posted February 20, 2005 do u mean you backed it up on your site via the tools/backup and then are trying to restore? how are you trying to do it? Link to comment Share on other sites More sharing options...
Guest Posted February 20, 2005 Share Posted February 20, 2005 How did you create your backup? How did you try to install the backup? phpMyAdmin? osCommerce built-in? Link to comment Share on other sites More sharing options...
hts-direct Posted February 20, 2005 Author Share Posted February 20, 2005 sorry wasnt to clear on my dicription, bassicly ive exported my database of my online shop to my desktop with phpmyadmin, along with all my other files (trying to run a copy of my shop on local host) but when i come to import my backup with phpmyadmin on local host it comes up with the error. ive tried uploding it by creating a new db with the same name then clicking sql & uploading the saved export. am i doing this correctly? Link to comment Share on other sites More sharing options...
Guest Posted February 20, 2005 Share Posted February 20, 2005 Have you opened your .sql file (created backup file) to see if there is anything strange in there? If it looks fine then: 1. Create an empty database 2. Click SQL (near the top of the phpMyAdmin page) 3. Just excute the .sql backup file. Link to comment Share on other sites More sharing options...
hts-direct Posted February 20, 2005 Author Share Posted February 20, 2005 everything looks ok in there (it is the first time ive done this though as im very new to osc! this is the first part of the code -- phpMyAdmin SQL Dump -- version 2.6.1-rc1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Feb 20, 2005 at 09:39 PM -- Server version: 4.0.23 -- PHP Version: 4.3.10 -- -- Database: `osc` -- -- -------------------------------------------------------- -- -- Table structure for table `address_book` -- CREATE TABLE `address_book` ( `address_book_id` int(11) NOT NULL auto_increment, `customers_id` int(11) NOT NULL default '0', `entry_gender` char(1) NOT NULL default '', `entry_company` varchar(32) default NULL, `entry_firstname` varchar(32) NOT NULL default '', `entry_lastname` varchar(32) NOT NULL default '', `entry_street_address` varchar(64) NOT NULL default '', `entry_suburb` varchar(32) default NULL, `entry_postcode` varchar(10) NOT NULL default '', `entry_city` varchar(32) NOT NULL default '', `entry_state` varchar(32) default NULL, `entry_country_id` int(11) NOT NULL default '0', `entry_zone_id` int(11) NOT NULL default '0', PRIMARY KEY (`address_book_id`), KEY `idx_address_book_customers_id` (`customers_id`) ) TYPE=MyISAM AUTO_INCREMENT=9 ; it still comes up with no sql query though when i try to execute the file. also i have this error on my local site: not sure if this has anything to do with it? Warning: mysql_connect(): Access denied for user: 'motoland@localhost' (Using password: YES) in c:\program files\easyphp1-7\www\catalog\includes\functions\database.php on line 19 Unable to connect to database server! Link to comment Share on other sites More sharing options...
Guest Posted February 20, 2005 Share Posted February 20, 2005 most likely the username and password for localhost, by default easyphp has no user other than root assigned, so you will need to setup a user Link to comment Share on other sites More sharing options...
Bigredman74 Posted February 21, 2005 Share Posted February 21, 2005 I had a very similar problem importing my database on localhost. I got it to work by checking the "Add DROP DATABASE" in phpMyAdmin when I exported the database. After that, I have had no more problems uploading the database on localhost. Give it a try. I hope it works for you too. My Published & Modified Contributions Helpful Forum Topics: Basic Design Tips & Tricks | Simple Steps to Better Forum Searching | Speed / Performance Optimizations Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.