Phpmyadmin Sql 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 no database selected mysql error Learn more about Stack Overflow the company Business Learn more about hiring developers
#1046 - No Database Selected Import Phpmyadmin
or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow no database selected mysql php Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Error #1046 - No database selected SQL import error 1046 (3d000) no database selected grant 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 then to -> Import. After I import the db I get
No Database Selected Mysql Workbench Import
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 47.1k23221191 asked Jul 11 '12 at 17:46 accraze 54851034 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 it
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 about hiring developers or no database selected mysql command line posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss #1046 - no database selected wordpress Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes
No Database Selected Mysqli
a minute: Sign up phpMyAdmin “No database selected” MySQL up vote 8 down vote favorite 4 I downloaded a MySQL backup file and promptly imported into MAMP's phpMyAdmin. I got this return: Error SQL query: -- -- Database: `mysql` -- http://stackoverflow.com/questions/11438427/error-1046-no-database-selected-sql-import-on-xampp -- -------------------------------------------------------- -- -- Table structure for table `columns_priv` -- CREATE TABLE IF NOT EXISTS `columns_priv` ( `Host` CHAR( 60 ) COLLATE utf8_bin NOT NULL DEFAULT '', `Db` CHAR( 64 ) COLLATE utf8_bin NOT NULL DEFAULT '', `User` CHAR( 16 ) COLLATE utf8_bin NOT NULL DEFAULT '', `Table_name` CHAR( 64 ) COLLATE utf8_bin NOT NULL DEFAULT '', `Column_name` CHAR( 64 ) COLLATE utf8_bin NOT NULL DEFAULT '', `Timestamp` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP , `Column_priv` SET( 'Select', 'Insert', 'Update', http://stackoverflow.com/questions/13950853/phpmyadmin-no-database-selected-mysql 'References' ) CHARACTER SET utf8 NOT NULL DEFAULT '', PRIMARY KEY ( `Host` , `Db` , `User` , `Table_name` , `Column_name` ) ) ENGINE = MYISAM DEFAULT CHARSET = utf8 COLLATE = utf8_bin COMMENT = 'Column privileges'; MySQL said: #1046 - No database selected I did not alter the .sql file at all. Any hints on how i can get this puppy going locally? Thanks! mysql phpmyadmin mamp share|improve this question asked Dec 19 '12 at 10:59 NateHunt 63116 add a comment| 6 Answers 6 active oldest votes up vote 5 down vote Just create a database with some name first of all. Click on that database and then import your table. The problem here is when you import any table it looks for which database you are using. So, either do as I said above or add this just above CREATE TABLE IF NOT EXISTS columns_priv ( USE your_db_name;//here your_db_name is the database you just created. That's it. share|improve this answer answered Dec 19 '12 at 11:03 Anwar 517212 Ok thanks for your patience. I'll try it out. –NateHunt Dec 19 '12 at 11:07 sure... try it out. It will surely work –Anwar Dec 19 '12 at 11:13 add a comment| up vote 4 down vote In phpMyAdmin make a new database or select a existed database. Then import the SQL file. share|improve this answer answered Dec 19 '12 at 11:01 Jordi Kroon 1,53311238 add a comme
Google. Het beschrijft hoe wij gegevens gebruiken en welke opties je hebt. Je moet dit vandaag nog doen. Navigatie https://www.youtube.com/watch?v=ZciWnmcf7fU overslaan NLUploadenInloggenZoeken Laden... Kies je taal. Sluiten Meer informatie View this message in English Je gebruikt YouTube in het Nederlands. Je kunt deze voorkeur hieronder wijzigen. Learn more You're viewing YouTube in Dutch. You can change this preference below. Sluiten Ja, nieuwe versie behouden Ongedaan maken Sluiten Deze video is niet beschikbaar. WeergavewachtrijWachtrijWeergavewachtrijWachtrij Alles verwijderenOntkoppelen Laden... no database Weergavewachtrij Wachtrij __count__/__total__ Fix #1046 - No database selected itcs program AbonnerenGeabonneerdAfmelden271271 Laden... Laden... Bezig... Toevoegen aan Wil je hier later nog een keer naar kijken? Log in om deze video toe te voegen aan een afspeellijst. Inloggen Delen Meer Rapporteren Wil je een melding indienen over de video? Log in om ongepaste content te melden. Inloggen no database selected 23.656 weergaven 74 Vind je dit een leuke video? Log in om je mening te geven. Inloggen 75 7 Vind je dit geen leuke video? Log in om je mening te geven. Inloggen 8 Laden... Laden... Laden... Beoordelingen zijn beschikbaar wanneer de video is verhuurd. Deze functie is momenteel niet beschikbaar. Probeer het later opnieuw. Gepubliceerd op 24 apr. 2015how to fix ERROR : #1046 - No database selected MySQL said: Documentation#1046 - No database selected Categorie Games Licentie Standaard YouTube-licentie Meer weergeven Minder weergeven Laden... Advertentie Autoplay Wanneer autoplay is ingeschakeld, wordt een aanbevolen video automatisch als volgende afgespeeld. Volgende MySQL Tutorial for Beginners - 1 - Creating a Database and Adding Tables to it - Duur: 8:50. primetubervideos 664.446 weergaven 8:50 1046 Error in SQL In phpMyAdmin[Solved] - Duur: 1:34. Zaroon bin hadi 360 weergaven 1:34 IMPORTAR EXPORTAR BASE DATOS SQL PHPMYADMIN - Duur: 8:00. APRENDIZ WEBMASTER 8.424 weergaven 8:00 How to Fix No Database Selected Problem in MySQL - Duur: 1:54. Codescoder Program 758 weergaven 1