while(query_mysql.next){ insert into tab_access(f1,f2...) values(<query_mysql.value(0)>,<query_mysql.value(1)>,...) }
insert into база1.to_table select * from база2.from_table