Mysql Error 1046 No Database Selected Php
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the no database selected mysql error workings and policies of this site About Us Learn more about #1046 - no database selected import Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions no database selected mysql workbench import Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other.
Error 1046 (3d000) No Database Selected GrantJoin them; it only takes a minute: Sign up Error 1046 No database Selected, how to resolve? up vote 137 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 no database selected mysql command line ) 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 199k37360417 asked Oct 23 '10 at 18:19 steph 692253 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 vo
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 no database selected mysqli hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask
Error Code 1046 In Mysql WorkbenchQuestion x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join
#1046 - No Database Selected Wordpressthem; 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 http://stackoverflow.com/questions/4005409/error-1046-no-database-selected-how-to-resolve to 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 = http://stackoverflow.com/questions/6880511/phpmyadmin-database-import-error-1046-no-database-selected latin1 AUTO_INCREMENT =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
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 About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us WordPress Development Questions Tags Users Badges Unanswered Ask Question _ WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute: Sign 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 Database migration issues - Error #1046 No database selected up vote 0 down vote favorite i need to get my clients website online and have been able to figure everything out except of course the most crucial part which is the database upload. i can't figure out what i'm doing wrong since every tutorial and forum i've been on has basically told me to do the same things and still i get errors. i'm missing a crucial point that must be assumed. the test i've made was to locally move my database by simply copying my local site and renaming the database and adjusting my config.php file accordingly. after that i figured my database was set for upload but after uploading i get the error: #1046 = No database selected. how can there be no database selected? database migration localhost production share|improve this question asked Sep 18 '12 at 7:12 Ijan Hilaire 112 Hi! Please use proper upper-/lowercase letters and the formatting possibilities from the editor. The question, as it currently stands, is pretty hard to read. When someone is scanning questions for a problem later, she/he will have a hard time reading this quickly and we want to help later readers too, right? :) –kaiser♦ Sep 18 '12 at 8:21 add a comment| 2 Answers 2 active oldest votes up vote 1 down vote 99.99% chance that you configure wordpress with wrong database details. make sure you are using correct database details in wp-config.php file /** The name of the database for WordPress */ define('DB_NAME', 'database_name_here'); /** MySQL database username */ define('DB_USER', 'username_here'); /** MySQL database password */ define('DB_PASSWORD', 'password_here'); /** MySQL hostname */ define('DB_HOST', 'localhost'); some possibilities are listed here based on my experien