Error 1046 No Database Selected
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 error 1046 no database selected mysql more about Stack Overflow the company Business Learn more about hiring developers or error 1046 3d000 no database selected posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow
Error 1046 No Database Selected Import
Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Error 1046 No database Selected, how to resolve? up
Mysql Create Database
vote 136 down vote favorite 22 Error SQL query: -- -- Database: `work` -- -- -------------------------------------------------------- -- -- Table structure for table `administrators` -- CREATE TABLE IF NOT EXISTS `administrators` ( `user_id` varchar( 30 ) NOT NULL , `password` varchar( 30 ) NOT NULL ) ENGINE = InnoDB DEFAULT CHARSET = latin1; MySQL said: #1046 - No database selected need some help here. sql mysql mysql-error-1046 share|improve this error 1064 no database selected question edited Oct 23 '10 at 18:21 OMG Ponies 198k36356415 asked Oct 23 '10 at 18:19 steph 687253 5 In case anyone is interested, you can also specify the database name via the CLI command without editing the import file. mysql -u root -p databasename < import.sql –Sam Dufel Nov 24 '14 at 15:36 what happened to me was: create a schema, filled in the name of the database, then it says "fail, no database selected". reopen workbench, i see database that i have just failed to created. Then I choose the database that i have just created, and open a .sql file and run, with both create database and use database statements, it complains "fail no database selected" again. reopen workbench, the tables are all built. MAC system, workbench 6.3.3 –Tiina Jun 9 at 9:12 add a comment| 13 Answers 13 active oldest votes up vote 212 down vote You need to tell MySQL which database to use: USE database_name; before you create a table. In case the database does not exist, you need to create it as: CREATE DATABASE database_name; followed by: USE database_name; share|improve this answer edited Feb 24 '13 at 0:02 Piero 2,881946102 a
Du kan ändra inställningen nedan. Learn more You're viewing YouTube in Swedish. You can change this preference below. Stäng Ja, behåll den Ångra Stäng Det här videoklippet är inte tillgängligt.
#1046 - No Database Selected Import
VisningsköKöVisningsköKö Ta bort allaKoppla från Läser in ... Visningskö Kö __count__/__total__ Ta reda no database selected mysql php på varförStäng Fix #1046 - No database selected itcs program PrenumereraPrenumerantSäg upp269269 Läser in ... Läser in ... Arbetar ... Lägg no database selected mysql workbench import till i Vill du titta på det här igen senare? Logga in om du vill lägga till videoklippet i en spellista. Logga in Dela Mer Rapportera Vill du rapportera videoklippet? Logga in om http://stackoverflow.com/questions/4005409/error-1046-no-database-selected-how-to-resolve du vill rapportera olämpligt innehåll. Logga in 22 746 visningar 73 Gillar du videoklippet? Logga in och gör din röst hörd. Logga in 74 7 Gillar du inte videoklippet? Logga in och gör din röst hörd. Logga in 8 Läser in ... Läser in ... Läser in ... Rankning kan göras när videoklippet har hyrts. Funktionen är inte tillgänglig just nu. Försök igen senare. Publicerades den 24 apr. https://www.youtube.com/watch?v=ZciWnmcf7fU 2015how to fix ERROR : #1046 - No database selected MySQL said: Documentation#1046 - No database selected Kategori Spel Licens Standardlicens för YouTube Visa mer Visa mindre Läser in ... Annons Automatisk uppspelning När automatisk uppspelning är aktiverad spelas ett föreslaget videoklipp upp automatiskt. Kommer härnäst MySQL Tutorial for Beginners - 1 - Creating a Database and Adding Tables to it - Längd: 8:50. primetubervideos 652 205 visningar 8:50 1046 Error in SQL In phpMyAdmin[Solved] - Längd: 1:34. Zaroon bin hadi 254 visningar 1:34 IMPORTAR EXPORTAR BASE DATOS SQL PHPMYADMIN - Längd: 8:00. APRENDIZ WEBMASTER 7 940 visningar 8:00 How to Fix No Database Selected Problem in MySQL - Längd: 1:54. Codescoder Program 758 visningar 1:54 SERVIDOR WEB CON XAMPP CONFIGURACION DEL PUERTO 80 - Längd: 15:12. Jose Muñoz 17 600 visningar 15:12 PHP and MySQL with MySQLi: Getting results (Part 4/9) - Längd: 16:09. Codecourse 78 615 visningar 16:09 how to import and export data base in sql 2015 - Längd: 10:52. indian highway 260 visningar 10:52 "No Database Selected" Error During The SQL File Import - Längd: 1:44. TemplateMonsterCo 3 022 visningar 1:44 What is Database & SQL? - Längd: 6:20. Guru99 463 694 visningar 6:20 Connect to MySQL with PHP in XAMPP
log in tour help Tour Start 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 http://dba.stackexchange.com/questions/27245/error-1046-mariadb-no-database-selected About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Database Administrators Questions Tags Users Badges Unanswered Ask Question _ Database Administrators http://forum.wampserver.com/read.php?2,121899,121960 Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute: Sign no database up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Error 1046 Mariadb: No database selected up vote 3 down vote favorite 1 GRANT ALL ON my-database.* TO my-user@10.0.0.1 IDENTIFIED BY 'password'; ERROR 1046 (3D000): No database selected Ok, I have created a database with a "-" on the name (did the no database selected same thing on the user)... then when I try to set the grants on it the database wont work. If I use the base the error is different MariaDB [(none)]> use my-base Database changed MariaDB [my-base]> GRANT ALL ON 'my-base'.* TO 'my-user'@'10.0.0.1' IDENTIFIED BY 'password'; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''my-base'.* TO 'my-user'@'10.0.0.1' IDENTIFIED BY 'password'' at line 1 MariaDB [my-base]> mariadb share|improve this question edited Mar 8 at 22:54 RolandoMySQLDBA 107k15138274 asked Oct 19 '12 at 14:27 maniat1k 1702516 1 In regards to the second error if you set your database, if you're not running in ANSI-quote sql_mode, ' doesn't escape a database object. Use the back tick ` –Derek Downey Oct 19 '12 at 15:03 1 Slight correction to myself...ANSI_QUOTES affects the double-quotes for escaping...single-quotation never does :) –Derek Downey Oct 19 '12 at 15:14 add a comment| 1 Answer 1 active oldest votes up vote 8 down vote accepted Try escaping it with backticks? GRANT ALL ON `my-database`.* TO `my-user`@`10.0.0.1` IDENTIFIED BY 'password'; Also, if you alr
- MySQL said: #1046 - No database selected Posted by: IrvC (---.hfc.comcastbusiness.net)Date: February 21, 2014 04:27PMI am trying to import the database that I exported from our live site to WAMP using phpMyAdmin. I browse for the .sql file that the export created and click GO. I tried leaving SQL compatibility mode as NONE, and also selected MYSQL40 and MYSQL323 for compatbility mode.I am getting error #1046 - No Database Selected.Any clues?IrvWindows 7WAMP ver. 2.4 (just downloaded this week)Edited 1 time(s). Last edit at 02/21/2014 04:46PM by IrvC.Options:Reply•QuoteRe: Import error - MySQL said: #1046 - No database selected Posted by: RiggsFolly (---.as13285.net)Date: February 23, 2014 03:43PMLook at your .sql file from your database dump. It probably does not contain a 'USE xxx;' statement.So add a USE databasename;To the top of your .sql file where 'databasename' is a database you have previously created using phpmyadmin.---------------------------------------------------------------------------------------------(Windows 7 Pro 32bit) (Wampserver 3.0.6RC2 32bit) - Apache 2.4.18 - PHP 5.6.15 - MySQL 5.7.10