1046 No database selected mysql cpanel -


how fix error when import database phpmyadmin cpanel:

    sql query:  -- -- database: `news_letter` -- -- -------------------------------------------------------- -- -- table structure table `banner_tbl` --      create table if not exists  `banner_tbl` (      `ban_id` int( 11 ) not null ,     `banner_img` varchar( 255 ) not null ,     `date` varchar( 255 ) not null      ) engine = innodb auto_increment =158 default charset = latin1;  mysql said: documentation  #1046 - no database selected 

add following lines on top of .sql file

create database if not exists `news_letter`; use `news_letter`; 

Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -