Mysqldump Error 1046
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 error 1046 no database selected mysql workbench Learn more about Stack Overflow the company Business Learn more about hiring developers or error 1046 no database selected phpmyadmin posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow no database selected error in php Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Error 1046 No database Selected, how to resolve? error 1046 (3d000) no database selected grant 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 ) NOT NULL ) ENGINE = InnoDB DEFAULT CHARSET = latin1; MySQL said: #1046 - No database selected need some help here. sql mysql mysql-error-1046 share|improve
Error Code 1046 In Mysql Workbench
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 votes up vote 216 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
Community Podcasts MySQL.com Downloads Documentation Section Menu: MySQL Forums :: Backup :: mysqldump error 1046 New Topic Advanced Search mysqldump error 1046 Posted by: Phil Brown () Date:
No Database Selected Mysql Workbench Import
February 06, 2008 02:46PM I've been trying to get mysqldump to work no database selected mysql command line with one particular database, but keep receiving, "mysqldump: Couldn't execute 'use [databasename]' " mysqldump -h -u --password -r no database selected mysqli "c:\Program Files\MySQL\forums.sql" --single-transaction --add-drop-database --add-drop-table -v --quote-names -B [databasename] this is a phpbb built database, and the name contains a "-" which is what seems to be causing the problem. http://stackoverflow.com/questions/4005409/error-1046-no-database-selected-how-to-resolve ANSI_QUOTES is not set on the server, but the documentation doesn't seem to indicate that it would be a problem. Using the -force, it will give me a partial dump of some tables, but most error out. I've been experimenting with various options for a few days now to no effect. So I could use a little help. Navigate:Previous Message•Next Message http://forums.mysql.com/read.php?28,195142,195142 Options:Reply•Quote Subject Views Written By Posted mysqldump error 1046 3385 Phil Brown 02/06/2008 02:46PM Sorry, you can't reply to this topic. It has been closed. powered by phorum Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party. Contact Sales USA: +1-866-221-0634 Canada: +1-866-221-0634 Germany: +49 89 143 01280 France: +33 1 57 60 83 57 Italy: +39 02 249 59 120 UK: +44 207 553 8447 Japan: 0120-065556 China: 10800-811-0823 India: 0008001005870 More Countries» Contact Us Online» Products MySQL Enterprise Edition MySQL Standard Edition MySQL Classic Edition MySQL Cluster CGE MySQL Embedded (OEM/ISV) Services Training Certification Consulting Support Downloads MySQL Community Server MySQL Cluster MySQL Fabric MySQL Utilities MySQL Workbench About MySQL Contact Us How to Buy Partners Job Opportunities Site Map Documentation MySQL Reference Manuals MySQL Workbench Expert Guides Topic Guides MySQL Cluster Legal Legal Policies Your Privacy Rights Terms of Use Trademark Policy Contributor Agreement © 2015, Oracle Corporation and/or its affiliates
be used out of the box without changing the system it runs on. This is where docker enters the game. Thanks to process injection there is an easy no database way to load an SQL dump into a docker container: Start a mysql instance docker run --name dump -p 3306:3306 -e MYSQL_ROOT_PASSWORD=root -d mysql This starts a docker container with name dump using the official no database selected MySQL docker image. It also makes the database available to the host on standard port 3306. Load the SQL dump docker exec -i dump mysql -uroot -proot < dump.sql Et voilà : the dump is loaded! Note that the -i option allows to use input redirection from the host right into the docker container. Written by Blog Logo Marvin Frommhold "Aufgrund falschen Medienkonsums und Bildungsmangel gibt es in Deutschland immer mehr assipöse Menschen." 19 Feb 2015 Share This content is licensed under a CC BY-NC 4.0 license. Please enable JavaScript to view the comments powered by Disqus. Image depressiveRobot random stuff by a linked data engineer Back to Overview