• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

can not import in mysqlworkbench

 
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I exported database, from mysql workbench, and it is in local disk C, and then delete the database, from MySQL workbench, and then imported database(which I exported previously, in this case ui.sql) and original database name is hibernatedb (which I deleted from MySQL workbench), so now the error is unknown database, how can I import this?
Screenshot_1.png
[Thumbnail for Screenshot_1.png]
this is commands of import.
Screenshot_2.png
[Thumbnail for Screenshot_2.png]
this is exported database in local disk C.
 
Ranch Hand
Posts: 310
18
MS IE Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I guess that you had "Include CREATE SCHEMA" option disabled when you did the export. With this option disabled, your export file will not contain CREATE SCHEMA statement that creates a new schema (database). It will contain only CREATE TABLE, INSERT statements and so on.

Try simply to manually create "hibernatedb" database from MySQL Workbench / MySQL console and try to import the database again.
 
sarojni agrwal
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanku so much, this is so helpful, thanku again..adam
 
Andrew Polansky
Ranch Hand
Posts: 310
18
MS IE Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm glad I could help
 
sarojni agrwal
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
please tell me, where is the option of "include create schema", so that next time, automatically get the schema, no need to create manually..
 
Andrew Polansky
Ranch Hand
Posts: 310
18
MS IE Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The option can be found on the Export page (click to enlarge the image):

 
sarojni agrwal
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I exported and imported database through command line, so that option did not work, I choose command line export and import, because , I got error, in normal export and import.. I post in picture..
Screenshot_7.png
[Thumbnail for Screenshot_7.png]
this is error in export
 
Andrew Polansky
Ranch Hand
Posts: 310
18
MS IE Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This export error is a known issue, you can find the solution on this StackOverflow answer.

In command line, you can use the "-B" option, in example:
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic