Are these two separate databases or just two tables in the same database? From your problem's description, it sounded like they were two tables in the same db. From your code, though, you have one table in one database and you have a second table in the second database.
Anyway, here is my best guess at what you were trying to do. Notice my use of mysql_pconnect() There's no error checking and I didn't test it as I'm too lazy to build a second database on my server just to try it at this moment:
<?php
mysql_pconnect("localhost", "user", "pass") or die("could not connect");
mysql_select_db("mydb_1");
$result = mysql_query("SELECT countries_id, countries_name FROM table_1");
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
$c_id = $row['countries_id'];
$c_name $row['countries_name'];
mysql_connect("localhost", "user", "pwd") or die("could not connect");
mysql_select_db("mydb_2");
$insert = "INSERT INTO table_2
VALUES
('$c_id', '$c_name')";
$result_1 = mysql_query($insert)
or die("Couldn't perform INSERT statement: ".mysql_error());
}
?>