You can then use the update table name set id = id-4999;;
If the primary key ID of your original table is not continuous, the above method will not work.
Execute the first sentence first: SELECT @rownum := 0.
Then execute the following sentences.
Update the table name to t set t.id = (select (@ rownum: = @ rownum+1)).