Error 1046 3d000 No Database Selected Source
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta no database selected mysql workbench Discuss the workings and policies of this site About Us Learn
No Database Selected Mysql Workbench Import
more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us #1046 - no database selected phpmyadmin Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, #1046 - no database selected import helping each other. Join them; it only 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 IF NOT EXISTS `administrators` ( `user_id` varchar( 30 ) NOT
Error 1046 (3d000) No Database Selected Grant
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 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
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 command line developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question error code 1046 in mysql workbench x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them;
Mysql Workbench Import From Dump Project Folder No Database Selected
it only takes a minute: Sign up mySQL Workbench Importing up vote 1 down vote favorite I was trying to import it but i am encountering some errors. this is my error: 08:49:13 PM Restoring dbDB (contact) Running: mysql http://stackoverflow.com/questions/4005409/error-1046-no-database-selected-how-to-resolve --defaults-extra-file="/tmp/tmpdwf14l/extraparams.cnf" --host=127.0.0.1 --user=root --port=3306 --default-character-set=utf8 --comments ERROR 1046 (3D000) at line 22: No database selected Operation failed with exitcode 1 08:49:13 PM Restoring dbDBB (course) Running: mysql --defaults-extra-file="/tmp/tmpMW20Fb/extraparams.cnf" --host=127.0.0.1 --user=root --port=3306 --default-character-set=utf8 ERROR 1046 (3D000) at line 22: No database selected mysql-workbench share|improve this question edited Jun 11 '14 at 15:40 kmas 4,822102747 asked Feb 7 '14 at 12:52 harraypotter 46127 1 Google "mysql no database selected" of course. –Gimby Feb 7 '14 at 12:55 add a comment| 2 http://stackoverflow.com/questions/21628318/mysql-workbench-importing Answers 2 active oldest votes up vote 4 down vote accepted Error: You have not selected the default target schema in which to import the data from dump Create a schema/database in MySQL and select that database in MySQL Workbench while importing data from Dump. Or You can edit the dump file and append a SQL statement at the start with some thing like this create database test; use test; Solution as per the dump file of user: -- -- Table structure for table `course` -- Write the code as : create database test1; use test1; -- -- Table structure for table `course` -- This should do. share|improve this answer edited Feb 7 '14 at 13:12 answered Feb 7 '14 at 13:02 Punter015 75639 where should I put the code?? @Punter015 ? –harraypotter Feb 7 '14 at 13:06 @Pink000 Open up the dump file and append those lines at first. Or if you are using MySQL Workbencg you can create a database and then select it in the default target schema (as shown above in the picture). that would be easier for you. –Punter015 Feb 7 '14 at 13:08 THanks! i did it, but i have a question. Why is it happening only to me, when my classmates just do the same and not encounter any error? Have I missed something? –harraypotter Feb 7 '14 at 13:11 @Pink0
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 http://dba.stackexchange.com/questions/24371/how-to-import-a-sql-file-in-mysql 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 no database 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 no database selected 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 37139 6 There has to be no space between -p and password –tombom Sep 14 '12 at 11:47 What if I don't have a password? –Barbara Dreamer Sep 14 '12 at 11:57 Then skip password parameter. –Kazimieras Aliulis May 31 '13 at 10:35 Piping (mysqldump db -uuser -ppass|mysql new_db -uuser -ppass) removes the need to use an intermediate file. –Pacerier Oct 12 '15 at 10:05 The database has to exist in MySQL for this to work, I think. –Noumenon Feb 5 at 2:02 add a comment| up vote 8 down vote You can also import an .sql file as an already connected user to the