How to programmatically assign/add new groups to the OG in Drupal Commons 6.25
I am the author of og_massadd (which is quite buggy as it is now, unfortunately), but that module is only for adding users to an OG. But if I understand you correctly, you want to create the actual organic groups?

Doing this through PhpMyAdmin will probably be very cumbersome. You would need to add records to node, revisions, any CCK-tables (if your group nodes have CCK fields), og, og_uid (for group memberships) as a minimum. For addding content to your groups, you would need to add to node, revisions (CCK-tables if necessary) and og_ancestry.

It is a bit easier creating a group programmatically:

$groupnode = new stdClass();
$groupnode-&gt;type = 'gruppe'; // Group node type
$groupnode-&gt;status = 1;
$groupnode-&gt;uid = $owner_uid;
$groupnode-&gt;title = $title;
$groupnode-&gt;body = $body;
$groupnode-&gt;og_selective = $group_acces_level;
$groupnode-&gt;og_register = OG_REGISTRATION_NEVER;
$groupnode-&gt;og_directory = OG_DIRECTORY_CHOOSE_FALSE;
$groupnode-&gt;og_private = variable_get('og_private_groups', OG_PRIVATE_GROUPS_CHOOSE_FALSE);
$groupnode-&gt;{_integration_cGroupType}[0]['value'] = $cGroupType_content; // CCK field

node_save($groupnode);

if ($groupnode-&gt;nid) {
  og_insert_group($groupnode);

  // Set space (if spaces_og is used)
  //$ogspace = spaces_load('og', $groupnode-&gt;nid, TRUE);
  //$ogspace-&gt;controllers-&gt;variable-&gt;set('spaces_preset_og', $spacepreset);

  og_save_subscription($groupnode-&gt;nid, $owner_uid, array('is_active' =&gt; 1, 'is_admin' =&gt; 1));
} else {
  dpm('OG creation failed :(');
}