Error 1046 Mysql 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 developers mysql create database or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x
Mysql Error 1064
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 error 1046 (3d000): no database selected takes a minute: Sign up Error 1046 No database Selected, how to resolve? up vote 136 down vote favorite 22 Error SQL query: -- -- Database: `work` -- -- -------------------------------------------------------- -- -- Table structure for table `administrators` -- CREATE TABLE sql error 1046 no database selected 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 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
#1046 - No Database Selected Import
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 answered Oct 23 '10 at 18:21 codaddict 251k50362442 2 In my case, I had used mysqldump to export a database and was running into this upon import. I just had to edit the exported sql file to add these two commands to the top of it. –bh5k Oct 11 '12 at 17:01 Thanks! This is what I needed. I had a script to create my database and tables but the tables weren't getting created be
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 no database selected php Video ist nicht verfügbar. WiedergabelisteWarteschlangeWiedergabelisteWarteschlange Alle entfernenBeenden Wird geladen... Wiedergabeliste Warteschlange error 1046 (3d000) no database selected grant __count__/__total__ Fix #1046 - No database selected itcs program AbonnierenAbonniertAbo beenden269269 Wird geladen... Wird geladen... Wird verarbeitet... Hinzufügen
No Database Selected Mysql Workbench Import
Möchtest du dieses Video später noch einmal ansehen? Wenn du bei YouTube angemeldet bist, kannst du dieses Video zu einer Playlist hinzufügen. Anmelden Teilen Mehr Melden Möchtest du dieses http://stackoverflow.com/questions/4005409/error-1046-no-database-selected-how-to-resolve Video melden? Melde dich an, um unangemessene Inhalte zu melden. Anmelden 22.746 Aufrufe 73 Dieses 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 https://www.youtube.com/watch?v=ZciWnmcf7fU 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 - 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
"#1046: No database selected" error when trying to import a .sql file in phpMyAdmin. Solution #1: Before importing In phpMyAdmin, click on the Export tab from the home page of phpMyAdmin, without selecting any database. http://wisercoder.com/how-to-fix-the-1046-no-database-selected-error-in-phpmyadmin/ phpMyAdmin will then include instructions to create and select the database when you import it. This solution does not apply to most shared hosts, since they won't allow you to create a database from phpMyAdmin. Solution #2: The http://www.tomsguide.com/answers/id-2518591/mysql-error-1046.html alternative fix Unlike solution #1, this one also works on shared hosts. Create the new database on your server, then write down the name. Open your .sql file with a text editor Insert the following line right no database before the first CREATE TABLE instruction in your .sql file: USE your_database_name_here; Save your file, then import it in phpMyAdmin. SQL Tagged database, errors, mysql, phpmyadmin, sql ← How to get an Integer from a Java resultset How to properly validate email addresses in Java → 21 comments on “How to fix the "#1046: No database selected" error in phpMyAdmin” carle November 13, 2013 at 11:34 pm many thanks! save my life! Reply Sam June 3, no database selected 2014 at 2:08 pm What i get when i export my database is a notepad file format showing mywebname.sql instead of the normal sql file for upload to liveserver….please help as i dont know what could be wrong. Reply Nicolas Bouliane June 3, 2014 at 3:05 pm Upload that file in the import form Reply Manish Atri November 19, 2013 at 7:43 am Thanks a lot Buddy Reply Juanita Alcachofa December 5, 2013 at 6:32 pm Muy bueno, me sirvió. Reply Ivan January 3, 2014 at 11:07 pm Thank you! Solution #2 worked for me! Reply Pizo January 13, 2014 at 10:41 pm Thank you! Reply Mr January 21, 2014 at 11:54 pm Just wanted to add, since your solution led me to the answer : It's all because there is an existing database of the hosting company and they won't allow you to open one yourself, but rather suit yours into theirs. The solution therefore is to 1.export your database in sql format from phpmyadmin localhost 2.open that file with notepad++ 3.edit the first lines to this CREATE DATABASE IF NOT EXISTS hosting_db01 DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; USE hosting_db01; where ‘hosting_db01′ is the name of the hosting database, instead of your database 4.spread the luuuv Good luck - worked for me and thanx
error 1046 Tags: Localhost MySQL Last response: February 2, 2015 12:26 PM in Apps General Discussion Share mundomundo February 2, 2015 1:29:10 AM Hi everyone! I need to import the file into my local host joomla installation. But I'm receiving the error: SQL query: Table structure for table `bak_banner` DROP TABLE IF EXISTS `bak_banner` ; MySQL said: Documentation #1046 - No database selected Can you help me out? More about : mysql error 1046 Best solution Haavik February 2, 2015 12:26:44 PM Hi mundomundo! For the database import, before you attempt to import the "flat" file data in, you need go to your local DB (MySQL) and create new database After that you can import! If it useless try this tool http://www.repairtoolforsql.fixtoolbox.com/ Fix Toolbox for MySQL I found it here http://www.filerepairforum.com/forum/databases/database... Share Can't find your answer ? Ask ! Publish Ask the community Tags Example: Notebook, Android, SSD hard drive Publish Latest experts Ne0Wolf7 Motherboard Expert a b V Also expert in: CPUs rolli59 Graphics card Master a b U Also expert in: Motherboard, CPUs, Power supply ryguybuddy Motherboard Expert a b V Also expert in: Gaming, CPUs, Power supply Scores All badges Forum help Latest Reports Best Galaxy Note 7 Alternatives Anki Overdrive Review: Supertrucks Add to Racing Fun The Best Gifts for Pets: 2016 Guide The Best PC Games to Play Right Now The Best Fitness Gifts: 2016 Guide Tom’s guide in the world Germany France Italy Ireland UK About Us | Contact Us | Legal | Terms Of Use and Sale | Privacy | Copyright Policy | Purch Privacy Policy | Advertising | Computing.Net Copyright © 2016 Purch Group, Inc. All Rights Reserved. Ad choices Follow Tom’s guide Subscribe to our newsletter Sign up add to twitter add to facebook ajouter un flux RSS