Bug #96487 | error code 1046 (42000) no database selected | ||
---|---|---|---|
Submitted: | 9 Aug 2019 13:41 | Modified: | 15 Aug 2019 12:52 |
Reporter: | Daniel Lewis | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Workbench: SQL Editor | Severity: | S3 (Non-critical) |
Version: | 8.0.17, 8.0.21 | OS: | Ubuntu (18.04) |
Assigned to: | CPU Architecture: | Other (x86_64 AMD) |
[9 Aug 2019 13:41]
Daniel Lewis
[9 Aug 2019 16:55]
MySQL Verification Team
Thank you for the bug report. Please try a server version 5.6 or higher, 5.5.XX isn't more supported: https://dev.mysql.com/doc/workbench/en/wb-requirements.html.
[9 Aug 2019 18:17]
Daniel Lewis
On March 3, 2018, I created the file mysql_2018-03-03_0668.sql using workbench 5.5.47. Example #2 contains the top several rows of that file. While 5.5.47 may not be supported, I did use workbench 8.0.17 to import the data and structure from this file. This was for comparison only. I see that the export file created by workbench 5.5.47 begins with a Create Database statement. Export files created by workbench 8.0.17 does not begin with this statement. To me, this explains why the error code 1046 stating "no database selected". Question how to modify the export file so that it contains a Create Database statement that workbench will accept.
[12 Aug 2019 23:45]
MySQL Verification Team
Create schema option to export data
Attachment: 96487.png (image/png, text), 102.61 KiB.
[12 Aug 2019 23:46]
MySQL Verification Team
See screen-shot with option to create schema when export data.
[13 Aug 2019 0:09]
MySQL Verification Team
Include Create Schema for export data
Attachment: export_data_on_ubuntu.png (image/png, text), 83.63 KiB.
[15 Aug 2019 12:52]
Daniel Lewis
I have first managed to bring all my database data up to date. Then I exported it making sure I checked the box Include Create Schema. Finally, I imported what I had just exported. There were no problems for this. So, you have solved my problem just as you expected. Thanks!!!!
[22 Sep 2020 12:18]
MySQL Verification Team
Bug #100873 marked as duplicate of this one.