1
bugg_tb
Restoring XOOPs to an older version of mysql
  • 2006/11/3 16:59

  • bugg_tb

  • Just popping in

  • Posts: 8

  • Since: 2005/1/6 6


Hi Guys,

I've installed XOOPS to my local machine which runs MySQL 4.1.21. It all runs fine and the testing has checked out. Now I want to back it up and run it on my website hosts MySQL server which is an older 4.0.24 version, but I've hit a problem.

I backed it up with:

mysqldump --add-drop-table -h localhost -u ***** -p socialenterprise2 | bzip2 -c > socent.bak.sql.bz2

I then unzipped it and tried to upload with:

mysql -h mysql4.streamline.net -u ******** -p wamonline < socent.bak.sql

First it complained that

ERROR 1064 (00000) at line 21: 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=utf8' at line 28

So in the database dump I removed

DEFAULT CHARSET=utf8;

Now when I try and upload it I get

ERROR 1064 (00000) at line 21: 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 'LOCK TABLES `xoops_ams_article` WRITE' at line 29

Is there a way around this for example to export with an older syntax or is it a no go??

Cheers

Tom

2
m0nty
Re: Restoring XOOPs to an older version of mysql
  • 2006/11/3 17:33

  • m0nty

  • XOOPS is my life!

  • Posts: 3337

  • Since: 2003/10/24


when you dump the DB (using phpmyadmin)

there's a tickbox to dump the db in mysql4.0 compatibility, if you tick that box before dumping, you should be able to restore to an older version..

i'm not sure with commandline functions, but i would presume that somewhere there would be an option for compatibility..

3
m0nty
Re: Restoring XOOPs to an older version of mysql
  • 2006/11/3 17:40

  • m0nty

  • XOOPS is my life!

  • Posts: 3337

  • Since: 2003/10/24


i just found this >

Quote:
If you are using a recent version of mysqldump to generate a dump to be reloaded into a very old MySQL server, you should not use the --opt or --extended-insert option. Use --skip-opt instead.


http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html

4
svaha
Re: Restoring XOOPs to an older version of mysql
  • 2006/11/3 17:53

  • svaha

  • Just can't stay away

  • Posts: 896

  • Since: 2003/8/2 2


I did some conversions from MySQL 5 to MySQL 4.0
Afterwards I had to manually change some records in the database because for some reason 'auto increment' was changed into 'default zero'.
So if the conversion works but you can't post (for instance) two postings then check the old and new database for differences in the record structure.

Login

Who's Online

516 user(s) are online (407 user(s) are browsing Support Forums)


Members: 0


Guests: 516


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits