I got a DB files that created in My SQL , and I want open them in My SQL WorkBench 6.1.
The files I got contains : FRM ,MYD , MYI for each table, and another file calls db.opt.
how can I import that to the workbench?
thanks.
so first you restore the database in mysql server like explained in the linked anwser. Then you connect the workbench tool to you mysql server to open your database, note sometimes the word schema is used for "database".
to do so you need to create a database connection in workbench, i am just away from my machine. restoring the database in mysql server needs to be done before you can import / sync / reverse engineer the schema into workbench model.
Related
I have a database named db_x on server X (running WHM) and another database named db_y on server Y. I connected to server X via SSH made some changes to the phpmyadmin configurations to allow it to connect to db_y via phpmyadmin on server X via cPanel. Now, I want to move all the tables of the db_x on server_X to another database(db_y) which is on different server(yy.yy.yy.yy) by using phpMyAdmin from server_X.
Is there any way to do so? Please help me.
Edit: The table is over 3 GB, so export/import won't work.
due to the size of your database you will not be able to succeed with phpmyadmin.
Try use the SSH.
Upload the database to the new server "old_database.sql".
Considering that the database already existis on the new server, use the command below:
# mysql new_database < old_database.sql
This command will import your sql file into the new database.
If you don't have the old_database.sql file, you can also obtain it with command in old server
# mysqldump mydatabase > old_database.sql
This command will generate an SQL file from your database.
Ther will be an option export in db_x export it and in db_y click import
and chose downloaded file wich was exported and click run.
I exported a MySQL DB, both structure and data, using PHPMyAdmin, with the option of exporting it as MSSQL compatible single file: mydb.sql
The resulting file is large (about 2GB).
I have a DB set up on a Microsoft SQL Server.
How do I import the mydb.sql file, into the Microsoft SQL Server? I installed the Microsoft SQL Server Management Studio, and was able to use it to connect to the Microsoft SQL Server, and connect to the DB, but I can't figure out how to use it to import mydb.sql, to create the table and data.
Any ideas?
Choose File->Open from SSMS menu.
Pick your SQL file.
Once the file is loaded be sure that you are in the context of your database.
Click Execute button.
I have the data files of an old MySQL database (.frm, .MID, .MYI), taken from a server hard disk.
No way to be sure about MySQL version: I have no access to the server, I only know the server was a linux machine, built in 2009 or 2010, and then left alone without maintenance.
I downloaded and installed the last MySQL .MSI, but I'm totally new to MySQ.
The first step I need is importing my data into a new MySQL database, and then with a Delphi program I plan to move the data into a SQL Server DB.
How can i import these data tables?
Yo can stop mysql server, create some folder like old_data in mysql data directory, put all your .frm, .MID, .MYI files there and start mysql. After doing so you should be able to see old_data database in results of the SHOW DATABASES command.
I'm using MySql Workbench and WAMP Server. I have a database on the server and when I click reverse engineering on the workbench it imports the db structure, but not any of the inserts. What do I do to get the db data as well as the structure into the workbench.
Also on a separate point as I was using workbench, i noticed it did not automatically sync with the db on the server, ie. when i insert a new row, it did not reflect in the server.. must I forward engineer the db to the server every time i make a change? So sorry for my lack of understanding
MySql Workbench reverse engineering is only to obtain the Schema of the database.
If you want to search the database, make backups, obtain the schema and much more then you can use phpMyAdmin. There are some installers which configures the whole system to work with WAMP enviromment and includes it, like Xampp or ZendServer;
I want to import a MS SQL SERVER2008 R2 database backup to MySQL Server. Any help on how I can convert the .bak to a .sql so that it can be imported to a MySQL database server?
I have read other threads regarding this but none have worked so far.
Thank you.
You can restore the database to a local version of SQL Server (you can download the free evaluation edition to do this):
http://msdn.microsoft.com/en-us/evalcenter/ff459612.aspx
Then you can use the import/export wizard in Management Studio to transfer your tables and other objects to your MySQL database (you may need additional ODBC drivers installed locally in order for SQL Server to establish a connection to MySQL).
EDIT
When restoring the database to SQL Server, don't use the clunky UI. Use an actual RESTORE DATABASE command. For example:
RESTORE DATABASE foo FROM DISK = 'c:\path\foo.bak';
Now, you may find that the original database was created with files placed on drives or folders that don't exist locally. So I suggest creating a very simple folder, temporarily, called c:\db_temp\, giving the Everyone account modify privileges, and then running the following:
RESTORE FILELISTONLY FROM DISK = 'c:\path\foo.bak';
This will return a resultset like:
LogicalName PhysicalName
----------- ------------
Foo C:\...\foo.mdf
Foo_log C:\...\foo_log.ldf
You need to build a RESTORE DATABASE command something like the following, based on the result above:
RESTORE DATABASE foo FROM DISK = 'c:\path\foo.bak'
WITH MOVE 'Foo' TO 'c:\db_temp\foo.mdf',
MOVE 'Foo_log' TO 'c:\db_temp\foo_log.ldf';