update variable from multiple tables in one row
If your db2.table1 and db2.table2 tables are joined by some key field and the name field in both databases is unique, you can use the following query to update your data:

UPDATE `db1`.`table1` t SET 
t.`birthday` = 
(SELECT t2.`birthday` FROM `db2`.`table1` t1 JOIN
`db2`.`table2` t2 ON (t1.`key` = t2.`key`)
WHERE t.`name` = t1.`name`)


This should work if you need to update db2 -> db1. If you need to update db1 -> db2, the query can be changed as follows:

UPDATE `db2`.`table2` t2 SET t2.`birthday` = 
(SELECT t.`birthday` FROM `db1`.`table1` t  WHERE t.`name` = 
(SELECT t1.`name` FROM `db2`.`table1` t1 WHERE t1.`key` = t2.`key`))