Topic: Database Changeover probs

Hi,

Switching database from Mysql 4.1 to 4.0.

Exported as 4.0, then imported files.  All loads up ok, but first new topic had a "viewtopic.php?id=0" and therefore obviously cant be viewed, and then any topics created after that are met with "An error was encountered  Error: Unable to create topic. "

Do I need to activate the files in the new MySql or change permissions or something?

New to Mysql really so any help gratefully received.

Re: Database Changeover probs

A downgrade from 4.0 to 4.1 would proberbly not create these errors. I think it's a proceedual problem.

1) When you say exporting your database, are you using PHPmAdmin, cli, or even a PunBB plugin?
2) Are you inserting your sql back into a clean database? Try dropping the database and creating it again to prevent any residual data.

Re: Database Changeover probs

Exported out data in sql file using phpadmin, and then imported files using phpadmin.

Its a brand-spanking new database, with only these imported files in.

Not sure what you mean by dropping it and creating it again?

Re: Database Changeover probs

Very strange. Are the versions of phpmyadmin the same? Are the versions of punbb the same?

Also, check that the update was successfull, and that all the topics, members and posts are in fact being inserted into the database.

I'm willing to help out over some form of instant messaging.

Re: Database Changeover probs

aditogs: Sounds like auto_increment wasn't properly set

Re: Database Changeover probs

what do I need to do to make sure auto_incremenet works?  Like I say I know nothing and just exported then imported hoping it would work!?

xconspirisist, thanks for the offer.  What PM system do you use?

Thanks

At

Re: Database Changeover probs

aditogs wrote:

what do I need to do to make sure auto_incremenet works?  Like I say I know nothing and just exported then imported hoping it would work!?

It should work by default wink
The query to change it should be

alter table prefixtopics change id id int(10) unsigned not null auto_increment

where prefix is your db_prefix.
Of course, if exporting it failed for one table, it probably failed for every other table (posts, users, etc)

Re: Database Changeover probs

Hi,

Exporting to Mysql 4.0 doesn't allow for auto-increment.

(#1064 - You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near 'DEFAULT CHARSET=latin1 AUTO_INCREMENT=1' at line 9)

Which table do I need to set up auto incerement on (using the code you gave).  Is it just the 'id' of each table or do I need to do every variable in every table?

Thanks

Re: Database Changeover probs

http://punbb.org/docs/dev.html#dbtables
Look for where it talks about auto-incrementing

Re: Database Changeover probs

Cool.  Cheers.

You're a PunBB God in my book!