Can't import SQL file

Permalink
Hi, I'm trying to import an SQL file from a company we were working with, to recreate their Concrete5 site with their export file. I know very little about MySQL (I'm more of a front-end guy...!) but on trying to import this file, I get this error:
SQL query:
--
-- Table structure for table `AreaGroupBlockTypes`
--
DROP TABLE IF EXISTS `AreaGroupBlockTypes` ;
MySQL said:
#1046 - No database selected

This table seems to be at the very top of the SQL file, which implies there's something fundamentally wrong with the file, not the odd bit of code here or there.

Is this a simple thing to get round, or am I even asking the right question?

Thanks in advance...!

 
curtis replied on at Permalink Reply
curtis
The sql file you have describes table structure, and the data contained in those tables. It is up to you to first create a database in order to import the sql file into your database. This can be done in phpmyadmin or on in the mysql console (command line). Are you using phpmyadmin? If so, see this link:

http://wiki.phpmyadmin.net/pma/user_management#Creating_a_new_user...

I usually create a new user in pma using the steps described in that link, and choose to create a database with the same name and grant all privileges to the newly created user.

Once the database is created, click on 'databases', then select the new database, then you can import your file into that new database.

If you're not using pma, you can accomplish the same thing using the mysql console if you have command-line access to the db server as such:

http://rkutti.wordpress.com/2008/01/08/how-to-create-database-using...
goodwithfilm replied on at Permalink Reply
Thanks very much, Curtis - progress! I've done all this, and can now see in some database tables some of the desired content that's on the old site-to-be-replicated, but how do I now get the actual content of the database appearing as html in the new Concrete5 website (I cleared the cache but no change)? I'm guessing I'll have to import a whole lot of images to the Concrete File Manager, but wondering if the image/html file and folder structure will come with the SQL import?

Also I've noticed that a "Server Support" tab that appears at the bottom of my dashboard menu with another account doesn't appear with this current Concrete account - don't know if that makes any difference...

Thanks again,
Mike
Mnkras replied on at Permalink Reply
Mnkras