Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

file conversion- .mwb to .sql file

I have a database in .mwb format. I want to use it in eclipse so i need to convert it into .sql format. If anyone know how to do that by using any tool. I think My sql workbench can do that, but don't know how to do that.

like image 236
Vikas Gupta Avatar asked May 10 '12 10:05

Vikas Gupta


People also ask

How do I create a .SQL file in MySQL?

If you want to create a new database for the SQL file, you can do it with the following command: mysql> CREATE DATABASE DatabaseName; To create a MySQL user and assign a new password to it, run the following command: mysql> CREATE USER 'DatabaseUser'@'localhost' IDENTIFIED BY 'password';

How do I import a MWB file into MySQL Workbench?

When you save a model it is saved as a MySQL Workbench file with the extension mwb . Use the Import menu option to import a MySQL data definition (DDL) script file, one created by issuing the command mysqldump --no-data , for example.

How do I open a MWB file?

How do you open MWB files? You need a suitable software like MySQL Workbench from Oracle to open an MWB file. Without proper software you will receive a Windows message "How do you want to open this file?" or "Windows cannot open this file" or a similar Mac/iPhone/Android alert.


1 Answers

In the menu click "Database" and then "Forward engineering" (shortcut CTRL+G).

UPDATE:

Your .mwb file is a proprietary format, which also holds information of the graphical representation in Workbench. Your generated .sql file is a script, which your MySQL server needs to interpret. To create the database you designed via command line write something like this in the console of your choice:

mysql -u yourUser -p yourDatabase < yourFile.sql

You can omit "yourDatabase" when you create it with your script.

like image 76
fancyPants Avatar answered Nov 15 '22 00:11

fancyPants