Copy link to clipboard
Copied
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:
#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
This should help PhpMyAdmin Tutorial - Learn How to Manage your MySQL Databases
Copy link to clipboard
Copied
#1046 - No database selected
Have you created and selected the database for the query to take effect?
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
This should help PhpMyAdmin Tutorial - Learn How to Manage your MySQL Databases
Copy link to clipboard
Copied
Thanks to both Ben and osgood
Problem solved
and for Ben to the great link above
CIAO
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more