Error 1046 No Database Selected Mysql
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more error 1046 no database selected mysql workbench about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users
Mysql Create Database
Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each mysql error 1064 other. Join them; it only takes a minute: Sign up Error #1046 - No database selected SQL import on XAMPP up vote 15 down vote favorite 2 I am trying to import the SQL database from my Drupal
Sql Error 1046 No Database Selected
production site into a sandbox testing site on my local machine. I currently use XAMPP on my machine here at work. I have downloaded my db aipiadxxm_if9DHdr.sql and then I go to the phpMyAdmin on http://localhost/phpmyadmin/index.php then to -> Import. After I import the db I get this Error: SQL query: -- -- Database: `aipiadxxm_if9DHdr.sql` -- -- -------------------------------------------------------- -- -- Table structure for table `if9d_access` -- CREATE TABLE IF NOT EXISTS `if9d_access` ( `aid` int( 11 ) error 1046 (3d000): no database selected NOT NULL AUTO_INCREMENT , `mask` varchar( 255 ) NOT NULL default '', `type` varchar( 255 ) NOT NULL default '', `status` tinyint( 4 ) NOT NULL default '0', PRIMARY KEY ( `aid` ) ) ENGINE = MYISAM DEFAULT CHARSET = utf8 AUTO_INCREMENT =1; MySQL said: Documentation #1046 - No database selected What is causing this error message: #1046 - No database selected ? mysql sql drupal phpmyadmin xampp share|improve this question edited Aug 12 '13 at 1:33 Eric Leschinski 46.3k23221190 asked Jul 11 '12 at 17:46 accraze 54341034 1 It looks like the .sql file is just the table. Try creating the database in phpmyadmin, then importing the file as a table. –PeaBucket Jul 11 '12 at 18:14 add a comment| 1 Answer 1 active oldest votes up vote 37 down vote accepted You need to create and/or select the database on your sandbox machine before importing the SQL for the table structure and data. In phpMyAdmin, this means choosing a database from the sidebar and then using its import tab. If the database you want to fill doesn't exist, you have to create it first using the Create new database form. After import, you should confirm that the export-import process hasn't affected the anonymous user record (uid 0). share|improve this answer answered Jul 11 '12 at 18:33 scronide 7,61531629 1 thanks! that did the trick. good looki
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings
#1046 - No Database Selected Import
and policies of this site About Us Learn more about Stack Overflow
No Database Selected Php
the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation no database selected mysql workbench import Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it http://stackoverflow.com/questions/11438427/error-1046-no-database-selected-sql-import-on-xampp only takes a minute: Sign up Error Code: 1046. No database selected Select up vote -1 down vote favorite What seems to be wrong with my DB Error ? Im very new to SQL. Thanks <3 /* Navicat MySQL Data Transfer Source Server : Localhost Source Server Version : 50141 Source Host : localhost:3306 Source Database : tabulaDb Target Server Type http://stackoverflow.com/questions/27329099/error-code-1046-no-database-selected-select : MYSQL Target Server Version : 50141 File Encoding : 65001 Date: 2011-02-10 23:56:02 */ SET FOREIGN_KEY_CHECKS=0; -- Table structure for characters DROP TABLE IF EXISTS characters; CREATE TABLE characters ( id int(11) NOT NULL AUTO_INCREMENT, name varchar(64) NOT NULL, slotID tinyint(4) NOT NULL, userID int(11) NOT NULL, gender tinyint(4) NOT NULL, raceID tinyint(4) NOT NULL, classID tinyint(4) NOT NULL, ad1_classId int(11) NOT NULL, ad1_hue int(10) unsigned NOT NULL, ad2_classId int(11) NOT NULL, ad2_hue int(10) unsigned NOT NULL, ad3_classId int(11) NOT NULL, ad3_hue int(10) unsigned NOT NULL, ad4_classId int(11) NOT NULL, ad4_hue int(10) unsigned NOT NULL, ad5_classId int(11) NOT NULL, ad5_hue int(10) unsigned NOT NULL, ad6_classId int(11) NOT NULL, ad6_hue int(10) unsigned NOT NULL, ad7_classId int(11) NOT NULL, ad7_hue int(10) unsigned NOT NULL, ad8_classId int(11) NOT NULL, ad8_hue int(10) unsigned NOT NULL, ad9_classId int(11) NOT NULL, ad9_hue int(10) unsigned NOT NULL, ad10_classId int(11) NOT NULL, ad10_hue int(10) unsigned NOT NULL, ad11_classId int(11) NOT NULL, ad11_hue int(10) unsigned NOT NULL, ad12_classId int(11) NOT NULL, ad12_hue int(10) unsigned NOT NULL, ad13_classId int(11) NOT NULL, ad13_hue int(10) unsigned NOT NULL, ad14_classId int(11
Meyer Claus Meyer Pro Student 2,523 Points Problems with Mysql file (1046 - No database selected) Error SQL https://teamtreehouse.com/community/problems-with-mysql-file-1046-no-database-selected query: CREATE TABLE sizes ( id INT( 11 ) NOT NULL AUTO_INCREMENT , size VARCHAR( 32 ) COLLATE utf8_unicode_ci DEFAULT NULL , order INT( 11 ) NOT NULL , PRIMARY KEY ( id ) ) ENGINE = INNODB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci AUTO_INCREMENT =5; MySQL said: Documentation 1046 - No no database database selected No good, if you get problems just importing a file! Problem is that I cant write "Create table" 1 Answer Petros Sordinas 15,723 Points Petros Sordinas Petros Sordinas 15,723 Points about 2 years ago You have to tell SQL which database you are using Either : USE database_name; or if the database no database selected does not exist CREATE DATABASE database_name USE database_name; Claus Meyer Pro Student 2,523 Points Claus Meyer Claus Meyer Pro Student 2,523 Points 2y ago THANKS, I got it to work now... Oki, my database name is: movikcrewhunter USE movikcrewhunter; CREATE TABLE sizes ( id int(11) Posting to the forum is only allowed for members with active accounts. Please sign in or sign up to post. Our mission is to bring affordable, technology education to people everywhere, in order to help them achieve their dreams and change the world. Our Company About Us Contact Us Community Treehouse Stories Student Perks Treehouse Blog Affiliate Program Careers Topics HTML CSS Design JavaScript Ruby PHP WordPress iOS Android Development Tools Business Tracks Web Design Web Development Rails Development PHP Development iOS Development Android Development WordPress Development Starting a Business Treehouse Blog About Treehouse Privacy Policy Terms & Conditions © 2016 Treehouse Island, Inc. Sign in Email Address Password I forgot my password Sign in