Bash script to move MySQL tables from one db to another

已完成 已发布的 Mar 19, 2008 货到付款
已完成 货到付款

We need a bash script (or PHP - just needs to run on a LAMP stack) that will do the following steps:

1: Copy all tables in Database B to Database C

2: Copy all tables in Database A to Database B

3: Run a number of SQL statements on database B

The real world scenario is that we have a live database and a development database, we want to be able to easily copy all data from the live database (A) to the development database (B) whilst maintaining a copy of B in C (just in case...). After performing the switches, we need to run a few sql statements to do things like changing user email addresses etc - these aren't defined yet so just write the script with the ability to add new SQL statements in as we choose.

So when complete database A will be the same, database B will be an identical copy of A and database C will be a copy of B before B was replaced with a copy of A.

Thanks!

工程 MySQL PHP 项目管理 软件构架 软件测试

项目ID: #3807423

关于项目

4个方案 远程项目 活跃的Mar 24, 2008

授予:

csigvw

See private message.

$21.25 USD 在2天内
(24条评论)
4.9

有4名威客正在参与此工作的竞标,均价$32/小时

tomplus

See private message.

$42.5 USD 在2天内
(14条评论)
4.1
softguardian

See private message.

$55.25 USD 在2天内
(11条评论)
3.4
redoyrahman02

See private message.

$8.5 USD 在2天内
(0条评论)
1.7