for some reason i want the nid starts from 10000 instead of 1, how to do it?

I tried to set "ALTER TABLE `drupal`.`node` AUTO_INCREMENT = 10000;" to my db, but it does not work.

thanks in advance.


cog.rusty’s picture

You need to change the value in the sequences table, in the row for nids, to 9999.

gnosis.kv’s picture

thanks cog.rusty.

after update the sequences table, it works.

to make vid also start form 10000, just update "node_revisions_vid" in sequence table to 9999.

drupalisme’s picture

Use phpMyadmin, open the first node, change nid to 10000 and let AUTO_INCREMENT=1.
The AUTO_INCREMENT parameter used for increase the nid, i.e: if your current nid=5 and AUTO_INCREMENT=20 then the next nid will be 25, 45, 65 and so on.

mlhess’s picture

Do NOT do that. Drupal does not use auto_increment. You need to look at the sequences table.

alan’s picture

and how to make uid start from 10.000 ?

cog.rusty’s picture

In Drupal 5, go to the "sequences" table with phpmyadmin, browse it, find the "users_uid" row and change its value to 10000.

In Drupal 6, go to the "users" table, select the "Operations" tab at the top, and change "auto_increment" to 10000.

You must have already created the special "user 1" account before doing that.

alan’s picture

thanks man!
It works

rocket777’s picture

In drupal 6 if you do not have phpmyadmin run the following sql


E Ismail