Error - # 1046 - Database not selected

1

I'm trying to upload a database of a BackUp that I made from a page, but I get the following error:

Error
consulta SQL:


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) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  'meta_value' longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY ('meta_id'),
  KEY 'comment_id' ('comment_id'),
  KEY 'meta_key' ('meta_key'(191))
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1

MySQL has said: Documentation

1046 - Base de datos no seleccionada
    
asked by Pedro Miguel Pimienta Morales 08.06.2017 в 20:00
source

1 answer

5

You need to write

'USE NOMBRE_BASE'

This instruction is used to select the database, then you add your code and it should work

    
answered by 08.06.2017 / 20:08
source