Error 1046 Mysql Import
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
Mysql Import Error 1046 (3d000) At Line 22 No Database Selected
Us Learn more about Stack Overflow the company Business Learn more about hiring error code 1046 mysql developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the
Error Code 1046 Mysql Workbench
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 no database selected mysql error 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 then to -> Import. After I import the no database selected mysql php 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 importing the SQL for the table structure and data. In phpMyAdmin, this means choosing a d
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
Error 1046 (3d000) No Database Selected Grant
hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask no database selected mysql workbench import Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other.
No Database Selected Mysql Command Line
Join them; 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 http://stackoverflow.com/questions/11438427/error-1046-no-database-selected-sql-import-on-xampp tried 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,47692947 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 be
- 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 http://forum.wampserver.com/read.php?2,121899,121960 our live site to WAMP using phpMyAdmin. I browse http://dba.stackexchange.com/questions/24371/how-to-import-a-sql-file-in-mysql for the .sql file that the export created and click GO. 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 no database clues?IrvWindows 7WAMP ver. 2.4 (just downloaded this week)Edited 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 database dump. It probably does no database selected 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
log in 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 Database Administrators Questions Tags Users Badges Unanswered Ask Question _ Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. 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 How to import a .sql file in MySQL? up vote 16 down vote favorite 5 I am trying to import a .sql file using MySQL Workbench and I get this error: ERROR 1046 (3D000) at line 28: No database selected I have first created an empty database called with the same name as the .sql file but it doesn't work. I have also tried to do it with the mysql command client using: mysqldump -u root database > file.sql But it says a have an error in my SQL syntax. Furthermore, I don't know the path where I have to set the file.sql. mysql mysqldump import share|improve this question edited Oct 25 '12 at 4:01 RolandoMySQLDBA 107k15138274 asked Sep 14 '12 at 11:43 Barbara Dreamer migrated from stackoverflow.com Sep 16 '12 at 1:27 This question came from our site for professional and enthusiast programmers. add a comment| 7 Answers 7 active oldest votes up vote 22 down vote Export: mysqldump -u username –-password=your_password database_name > file.sql Import: mysql -u username –-password=your_password database_name < file.sql share|improve this answer edited Apr 15 at 19:51 answered Sep 14 '12 at 11:46 juergen d 37