Phpmyadmin 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 more about Stack Overflow the company Business Learn more about hiring
No Database Selected Mysql Error
developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question no database selected mysql php x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them;
Error 1046 (3d000) No Database Selected Grant
it only takes a minute: Sign up phpMyadmin database import error #1046 - No database selected up vote 6 down vote favorite 2 I have an sql file that i exported from phpmyadmin on another computer. I tried to #1046 - no database selected wordpress import the file on this computer and I get this error: Error SQL query: -- -- Database: `phplogin` -- -- -------------------------------------------------------- -- -- Table structure for table `people` -- CREATE TABLE IF NOT EXISTS `people` ( `id` INT( 11 ) NOT NULL AUTO_INCREMENT , `name` VARCHAR( 25 ) NOT NULL , `age` INT( 11 ) NOT NULL , `testvar` VARCHAR( 5 ) NOT NULL , PRIMARY KEY ( `id` ) ) ENGINE = MYISAM DEFAULT CHARSET = latin1 AUTO_INCREMENT no database selected mysql workbench import =3; MySQL said: #1046 - No database selected mysql database import phpmyadmin share|improve this question edited Dec 23 '14 at 16:00 default locale 6,50692947 asked Jul 30 '11 at 1:31 user780483 71181527 add a comment| 2 Answers 2 active oldest votes up vote 29 down vote The error is because you either didn't select a database on the left side to import to, and/or you didn't create the empty database first. Create a database in phpMyAdmin called "phplogin", select it on the left side, and then run the import. share|improve this answer answered Aug 3 '11 at 0:17 Clowerweb 841912 3 Any idea how to do this in a phpMyAdmin configuration that only logs into a specific database? (Thus there is no DB to select on the left, only tables.) –Old McStopher Jun 19 '14 at 1:01 Also, what if there was no database to select in the first place? I made an entire export of my entire phpmyadmin collection, and reformatted my computer. When I try to import the file, I get the same message. I need it to create the database tables for me, as I can't go through and add each one exactly as it was.. Why didnt this get included in the export? –Lee Apr 6 at 12:43 add a comment| up vote 2 down vote Append the following line to the beginning of your sql file CREATE DATA
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
No Database Selected Mysql Command Line
the company Business Learn more about hiring developers or posting ads with us Stack error 1046 citrix Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of
No Database Selected Mysqli
6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up phpMyAdmin “No database selected” MySQL up vote 8 down vote favorite 4 I downloaded a MySQL backup file http://stackoverflow.com/questions/6880511/phpmyadmin-database-import-error-1046-no-database-selected and promptly imported into MAMP's phpMyAdmin. I got this return: Error SQL query: -- -- Database: `mysql` -- -- -------------------------------------------------------- -- -- 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 http://stackoverflow.com/questions/13950853/phpmyadmin-no-database-selected-mysql 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', '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
Επιλέξτε τη γλώσσα σας. Κλείσιμο Μάθετε περισσότερα View this message in English Το YouTube εμφανίζεται στα Ελληνικά. https://www.youtube.com/watch?v=NG31NCESoCE Μπορείτε να αλλάξετε αυτή την προτίμηση παρακάτω. Learn more You're viewing YouTube in Greek. You can http://nicolasbouliane.com/blog/importing-sql-databases-from-wampserver-1046-no-database-selected-fix change this preference below. Κλείσιμο Ναι, θέλω να τη κρατήσω Αναίρεση Κλείσιμο Αυτό το βίντεο no database δεν είναι διαθέσιμο. Ουρά παρακολούθησηςΟυράΟυρά παρακολούθησηςΟυρά Κατάργηση όλωνΑποσύνδεση Φόρτωση... Ουρά παρακολούθησης Ουρά __count__/__total__ "No Database Selected" Error During The SQL File Import TemplateMonsterCo ΕγγραφήΕγγραφήκατεΚατάργηση εγγραφής6.5466 χιλ. Φόρτωση... Φόρτωση... Σε λειτουργία... Προσθήκη σε... no database selected Θέλετε να το δείτε ξανά αργότερα; Συνδεθείτε για να προσθέσετε το βίντεο σε playlist. Σύνδεση Κοινή χρήση Περισσότερα Αναφορά Θέλετε να αναφέρετε το βίντεο; Συνδεθείτε για να αναφέρετε ακατάλληλο περιεχόμενο. Σύνδεση Στατιστικά στοιχεία 3.079 προβολές 4 Σας αρέσει αυτό το βίντεο; Συνδεθείτε για να μετρήσει η άποψή σας. Σύνδεση 5 4 Δεν σας αρέσει αυτό το βίντεο; Συνδεθείτε για να μετρήσει η άποψή σας. Σύνδεση 5 Φόρτωση... Φόρτωση... Φόρτωση... Η δυνατότητα αξιολόγησης είναι διαθέσιμη όταν το βίντεο είναι ενοικιασμένο. Αυτή η λειτουργία δεν είναι διαθέσιμη αυτήν τη στιγμή. Δοκιμάστε ξανά αργότερα. Δημ
Contact Blog Fixing the «#1046: No database selected» error Here is the simple, quick fix to the "#1046: No database selected" error when importing a .sql file from a Wamp installation in phpMyAdmin. Fix: In phpMyAdmin, click the Export tab situated under Home instead of the one when you are viewing the database to export. This will allow you to export entire databases and not only the tables contained in it. This might not work for users of hosting sites such as Hostmonster or Hostgator, since they pick the database names for you. Alternative fix: Create the database on your server and note down the name. Open your .sql file with a text editor. You might want to use something other than Notepad since it doesn't recognize the line breaks. Insert the following line before your first CREATE TABLE command in your .sql file: USE yourdatabasename; Be careful to write in the right database name. Hostmonster users, for example, will have their username in front of their database name. Therefore, the products database is in fact named username_products. Save your .sql file and import it using the import tab in phpMyAdmin. Source Gareth a dit (8 juin. 2010): Thanks, this error was really bugging me! willyzl a dit (28 oct. 2011): Very Good solution. It is what I try looking for days. Thank you for your cool solutions. :DD Austin a dit (1 nov. 2011): you are a godsend, sir. LJ a dit (7 jan. 2012): Hi, I still cant do it. After i followed the steps I get and erro 1044. Could you post a video on how to do it? That would be really helpful. My whole website is ready and this is the final step and I am stuck here. I am not a web developer infact and not sure how to resolve it. Cheers, LJ Dennis Guerra a dit (17 jan. 2012): Thank you so much !!! Was desperate Dennis Shruti a dit (12 fév. 2012): Wow! Works like a charm! I got 1050 error after that.. So deleted the existing tables in that database.. Thanks a lot! Grazzer a dit (19 fév. 2012): Was struggling to do this. Used your instructions. All done and dusted. Many thanks … Simen a dit (12 mar. 2012): Thanks… Laisser un commentaire Nom Courriel Site web Message