It's not uncommon for an export/import from MySQL 3.23 to v4.x to lose all the auto-increment settings.
You may need to re-export your old database and specifically tell it to include auto-increment values. I believe that's done via a simple checkbox in phpMyAdmin. Or perhaps it's done via a v4-compatibility checkbox.