How to copy a table from one mysql database to another mysql database

前端 未结 12 1480
一个人的身影
一个人的身影 2020-12-07 21:03

I need to copy a table from one database to another. This will be a cronjob. Which one is the best way to do it? PHP script or Shell Script. The problem with PHP, both datab

12条回答
  •  执笔经年
    2020-12-07 21:50

    I'll put this answer up for anyone else looking for help.

    If you don't have access to SSH then you can use PhpMyAdmin.

    Simply:

    1. browse to the table you want to move
    2. Click the Operations tab
    3. Use the MOVE or COPY to database function

    If you come across privilege problems, you can temp grant a user Global permissions or add the same user to both databases.

提交回复
热议问题