mysql - Generating Update Query -



mysql - Generating Update Query -

i have 2 identical mysql database running on different machine. problem have update few column values of table 1 db other. can generate update query particular column in phpmyadmin or whats other way generate update query can run same query on other machine , have values in sync.

for example:

machine1 employee table has salary column. want update query salary column based on primary key of employee table. e.g.

update employee set salary = 5000 id = 1; update employee set salary = 5200 id = 2; ... ...................................where id = 1000;

i not sure if understood question. if need alter in different database need connect other databse first.

so:

connect db1 update in db1 connect db2 update in db2

additionally can utilize transaction avoid problems 1 db updated , other 1 fail.

if can't save db1 , db2 in same time, can sync 2 db: mysql database sync between 2 databases

mysql sql phpmyadmin

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -