Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

DW and My SQL error must be obvious

Advocate ,
Dec 14, 2016 Dec 14, 2016

I'm building a site in DW CC on and i Mac with the latest MAMP Pro installed.

For various reasons I'm importing/Exporting sql files from live servers using PHP My Admin, and reimporting to a local site.

I'm getting the error msg below for one such import:

Error

SQL query:

CREATE TABLE IF NOT EXISTS `wp_commentmeta` (

  `meta_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,

  `comment_id` bigint(20) unsigned NOT NULL DEFAULT '0',

  `meta_key` varchar(255) DEFAULT NULL,

  `meta_value` longtext,

  PRIMARY KEY (`meta_id`),

  KEY `comment_id` (`comment_id`),

  KEY `meta_key` (`meta_key`)

) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=9

MySQL said:

http://localhost:8888/phpMyAdmin/url.php?url=https%3A%2F%2Fdev.mysql.com%2Fdoc%2Frefman%2F5.6%2Fen%2...

#1046 - No database selected

Can anyone enlighten on the implications of this, and how it could be corrected?

The last line (#1046) . . . . I thought I'd dealt with that just prior to the export, but apparently not.

Thanks all

884
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Dec 15, 2016 Dec 15, 2016
Translate
Community Expert ,
Dec 14, 2016 Dec 14, 2016
#1046 - No database selected

Have you created and selected the database for the query to take effect?

Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Dec 14, 2016 Dec 14, 2016

Yes Ben

Its running currently behind a live WP site, and I'm downloading it from Crazy Domains using PHP My Admin interface / Export.

I thought I had carefully selected all the tables prior to export, and saved as a .sql file.

No Joy

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 14, 2016 Dec 14, 2016

So you have an .sql file exported from your remote server via phpMyAdmin?

You have set up a database in your local server phpMyAdmin environment to import the .sql file into?

You have selected the 'import' tab under the correct database in you local server via phpMyAdmin and browsed out to the .sql file you saved from the remote server?

It sounds to me like you are just trying to import the remotely exported .sql file into your local version of phpMyAdmin without first setting up a database to receive it.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Dec 14, 2016 Dec 14, 2016

That ( "without first setting up a database to receive it" ) could be a solution Ben

I'll do that and post back the results.

Many Thanks

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 15, 2016 Dec 15, 2016

This should help PhpMyAdmin Tutorial - Learn How to Manage your MySQL Databases

Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Dec 15, 2016 Dec 15, 2016
LATEST

Thanks to both Ben and osgood

Problem solved

and for Ben to the great link above

CIAO

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines