Error 1046 Mysql Database
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 mysql error 1046 (3d000) at line 22 no database selected this site About Us Learn more about Stack Overflow the company Business Learn
Error Code 1046 Mysql
more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question
No Database Selected Mysql Error
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 only takes a minute: Sign up Error
#1046 - No Database Selected Import
#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 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 no database selected mysql 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 ) 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 import
Du siehst YouTube auf Deutsch. Du kannst diese Einstellung unten ändern. Learn more You're viewing YouTube in German. You can change this preference below. Schließen Ja, ich möchte sie behalten Rückgängig machen Schließen Dieses Video ist nicht verfügbar. WiedergabelisteWarteschlangeWiedergabelisteWarteschlange Alle entfernenBeenden error 1046 (3d000) no database selected grant Wird geladen... Wiedergabeliste Warteschlange __count__/__total__ Fix #1046 - No database selected itcs program no database selected mysql workbench import AbonnierenAbonniertAbo beenden269269 Wird geladen... Wird geladen... Wird verarbeitet... Hinzufügen Möchtest du dieses Video später noch einmal ansehen? Wenn du bei no database selected mysql command line YouTube angemeldet bist, kannst du dieses Video zu einer Playlist hinzufügen. Anmelden Teilen Mehr Melden Möchtest du dieses Video melden? Melde dich an, um unangemessene Inhalte zu melden. Anmelden 22.746 Aufrufe 73 Dieses http://stackoverflow.com/questions/11438427/error-1046-no-database-selected-sql-import-on-xampp Video gefällt dir? Melde dich bei YouTube an, damit dein Feedback gezählt wird. Anmelden 74 7 Dieses Video gefällt dir nicht? Melde dich bei YouTube an, damit dein Feedback gezählt wird. Anmelden 8 Wird geladen... Wird geladen... Wird geladen... Die Bewertungsfunktion ist nach Ausleihen des Videos verfügbar. Diese Funktion ist zurzeit nicht verfügbar. Bitte versuche es später erneut. Veröffentlicht am 24.04.2015how to fix ERROR : #1046 https://www.youtube.com/watch?v=ZciWnmcf7fU - No database selected MySQL said: Documentation#1046 - No database selected Kategorie Gaming Lizenz Standard-YouTube-Lizenz Mehr anzeigen Weniger anzeigen Wird geladen... Anzeige Autoplay Wenn Autoplay aktiviert ist, wird die Wiedergabe automatisch mit einem der aktuellen Videovorschläge fortgesetzt. Nächstes Video MySQL Tutorial for Beginners - 1 - Creating a Database and Adding Tables to it - Dauer: 8:50 primetubervideos 652.205 Aufrufe 8:50 1046 Error in SQL In phpMyAdmin[Solved] - Dauer: 1:34 Zaroon bin hadi 254 Aufrufe 1:34 IMPORTAR EXPORTAR BASE DATOS SQL PHPMYADMIN - Dauer: 8:00 APRENDIZ WEBMASTER 7.940 Aufrufe 8:00 How to Fix No Database Selected Problem in MySQL - Dauer: 1:54 Codescoder Program 758 Aufrufe 1:54 SERVIDOR WEB CON XAMPP CONFIGURACION DEL PUERTO 80 - Dauer: 15:12 Jose Muñoz 17.600 Aufrufe 15:12 PHP and MySQL with MySQLi: Getting results (Part 4/9) - Dauer: 16:09 Codecourse 78.615 Aufrufe 16:09 how to import and export data base in sql 2015 - Dauer: 10:52 indian highway 260 Aufrufe 10:52 "No Database Selected" Error During The SQL File Import - Dauer: 1:44 TemplateMonsterCo 3.022 Aufrufe 1:44 Connect to MySQL with PHP in XAMPP / Create a new database - Dauer: 6:41 Ken Swartwout 308.745 Aufrufe 6:41 What is Dat
- 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. http://forum.wampserver.com/read.php?2,121899,121960 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 https://bugs.mysql.com/bug.php?id=73590 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 no database 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
Aug 2014 15:49 Reporter: Flavian C Email Updates: Status: Verified Impact on me: None Category:MySQL Server: Parser Severity:S3 (Non-critical) Version:5.5.26 5.6.19 OS:Any Assigned to: Triage: Needs Triage: D4 (Minor) View Add Comment Files Developer Edit Submission View Progress Log Contributions [14 Aug 2014 17:56] Flavian C Description: If we use multi-join inside a join the update query asks for DB name ERROR 1046 (3D000): No database selected How to repeat: Im getting no database select when using JOIN inside a JOIN. UPDATE DB1.TABLE1 as a JOIN (SELECT * FROM DB1.TABLE2 as b,(SELECT * DB1.TABLE2) as c WHERE b.col1 = c.col1) ea JOIN (SELECT SUM(d.size) FROM DB1.TABLE2 as d WHERE d.col1=xx) ef ON a.col1=ea.col1 and a.col1=ef.col1 set xxxx Also if ea alias join if we convert the inside join to subquery it works properly but takes a performance hit. i.e UPDATE DB1.TABLE1 as a JOIN (SELECT * FROM DB1.TABLE2 as b WHERE b.col1 = (SELECT c.col1 DB1.TABLE2 as c)) ea JOIN (SELECT SUM(d.size) FROM DB1.TABLE2 as d WHERE d.col1=xx) ef ON a.col1=ea.col1 and a.col1=ef.col1 set xxxx [14 Aug 2014 18:00] Sveta Smirnova Thank you for the report. Please specify which exact minor version of MySQL server you use and provide output of SHOW CREATE TABLE for all involved tables. [14 Aug 2014 18:28] Flavian C Just for test case you can do: Do not do " use dbname " login into mysql : execute the following CREATE TABLE flavian.`test1` ( `col1` int(3) DEFAULT NULL, `col2` int(3) DEFAULT NULL, `col3` int(3) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; CREATE TABLE flavian.`test2` ( `col1` int(3) DEFAULT NULL, `col2` int(3) DEFAULT NULL, `col3` int(3) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; mysql> update flavian.test1 a JOIN (select * from flavian.test2 b, (select * from flavian.test2 c where c.col1=1 limit 1) d where b.col1=d.col1) ea JOIN (select sum(e.col2) from flavian.test2 e where e.col1=1) ef set a.col2=ea.col2, a.col3=ef.col3 where a.col1=1 and a.col2=2; ERROR 1046 (3D000): No database selected mysql> update flavian.test1 a JOIN (select * from flavian.test2 b where b.col1=(select c.col1 from flavian.test2 c where c.col1=1 limit 1)) ea JOIN (select sum(e.col2) size1 from flavian.test2 e where e.col1=1) ef set a.col2=ea.col2, a.col3=ef.size1 where a.col1=1 and a.col2=2; Query OK, 0 rows affected [14 Aug 2014 18:35] Sveta Smirnova Thank you for the report. Verified as described. If run first query with default database correct error is returne