I think it is.
create
ONE database, then run installation from first gallery
then run installation from second gallery, using same database BUT! enter different table preffix.
for example:
1st datbase will be with prefix 4images_
2nd database will be with prefix 4images2_
then, open in second gallery /includes/constants.php
and change
define('USERS_TABLE', $table_prefix.'users');
to
define('USERS_TABLE', '4images_users');
where
4images_users is table on first gallery
this is just a theory, I dont know if anyone tryed this before, so good luck