Import/Exporting databases from one machine to another

后端 未结 2 1752
忘了有多久
忘了有多久 2021-01-23 06:49

I have two PCs, one is Ubuntu 8.10 and the other Ubuntu 9.10. On the Ubuntu 8.10, i have a few databases in phpmyadmin which i would like to copy across to the Ubuntu 9.10 phpmy

相关标签:
2条回答
  • 2021-01-23 07:29

    From the main screen of phpMyAdmin (visible right after login) there are "Export" and "Import" links. Use these facilities to export your database (to a file on your computer) and then to import that file on the destination host.

    Alternatively, if you have shell access to both machines, you could use the command mysqldump:

    mysqldump --password=PASSWORD -u root DATABASE > INSERT_STATEMENTS
    

    and then simply create all databases on the destination host with

    mysql -u root --password=PASSWORD < INSERT_STATEMENTS
    
    0 讨论(0)
  • 2021-01-23 07:46

    There's als MySQL Administrator that comes in the MySQL GUI Tools package. Since you've got access to both machines this is probably the easiest solution. Although I believe it just uses mysqldump, the GUI makes it a lot easier.

    0 讨论(0)
提交回复
热议问题