Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

Robert James
Robert James
20,491 Points

importing a .sql file through phpMyAdmin

I am getting the following error msg when trying to import my .sql file to my hosting page with phpMyAdmin.

Error SQL query:

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;

/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;

/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;

/*!40101 SET NAMES utf8 */;

--

-- Database: localwp_gallery15


--

-- Table structure for table wp_gallery15commentmeta

CREATE TABLE IF NOT EXISTS wp_gallery15commentmeta (

meta_id BIGINT( 20 ) UNSIGNED NOT NULL , comment_id BIGINT( 20 ) UNSIGNED NOT NULL DEFAULT '0', meta_key VARCHAR( 255 ) DEFAULT NULL , meta_value LONGTEXT ) ENGINE = INNODB DEFAULT CHARSET = utf8 AUTO_INCREMENT =1;

MySQL said: Documentation

1046 - No database selected

Any one able to help???

1 Answer

Eric Mckee
Eric Mckee
16,081 Points

CREATE DATABASE database_name; followed by: USE database_name;