how to migrate mysql database using gui between two non connected pc running windows

StackOverflow https://stackoverflow.com/questions/22424564

  •  15-06-2023
  •  | 
  •  

Frage

i have my windows form application in my home pc. i want to migrate it to my college PC.how to transfer MySQL database using GUI from one pc to another both running windows

War es hilfreich?

Lösung 4

i finally figured out the problem.. i first exported the data using the tab on the left hand side i selected the appropriate location for the exported file to be saved.(it created an sql query files of the database) i then copied it to my pen drive and pasted it on the other PC i installed workbench on the destination PC and imported the sql files but couldnt execute them. it said you dont have a connection something like that. i then searched for servies on my pc in that i got a list of all the services on my pc. search for mysqlxx(where x= integer) right click on it and select start. then go back to the workbench and execute the sql file the file will execute successfully but you wont be able to see the database. close workbench and reopen it you now will be able to see the database

Andere Tipps

I've never worked with mysql-workbench, but here's a fast and simple solution using the commandline:

Export

mysqldump -u [uname] -p db_name > db_backup.sql

Import

mysql -u username -p -h localhost DATA-BASE-NAME < db_backup.sql

Only for MyISAM tables, you can simply copy and paste the three files that you will find in the database folder inside 'C:\xampp\mysql\data' or similar.

These files have the extensions, .frm, .MYI and .MYD

Once you've pasted the files flush the tables via command or a GUI tool and you have a duplicate of the table on the original machine.

For more about these files see, http://en.wikipedia.org/wiki/MyISAM

If you prefer a more graphically oriented way of doing that use MySQL Workbench -> Management -> Data Export on the source machine. Likewise -> Data Import on the target box. It allows you to easily select individual tables/schemas, creates a self-contained dump file or individual files for each table in case you want to have greater control over what to import etc.

enter image description here

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top