1
saeed
MySQL error when transfering from local to server
  • 2005/11/15 15:29

  • saeed

  • Not too shy to talk

  • Posts: 106

  • Since: 2004/9/27


hello

I waste a lot of time and designed a XOOPS site in my local with apachefriend's xampp (MySQL 4.1.14 + PHP 5.0.5) to my hosting ( MySQL 4.0.25-standard + PHP 4.3.11 ) but I got this error mesage wehn I try to upload tables to database using phpmyadmin :

#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 'collate utf8_general_ci NOT NULL default '',
`avatar_name`

I tryed SQL export compatibility in phpmyadmin to MySQL 4.0 and 323 , after this tables was imported but whole site is ruined ! I cant see sumbited news , PDdownloads not working and a lot proplem . you can see the result here : http://www.nvidiaclub.com

pls hlp

All about electronics and hardware:
HardWare Freaks!

2
saeed
Re: MySQL error when transfering from local to server
  • 2005/11/15 15:50

  • saeed

  • Not too shy to talk

  • Posts: 106

  • Since: 2004/9/27


I must say, as you see in my site when I force database to be compatibile with mysql4.0 some of my modules and blocks will disapear ( pdownloads , news 1.4 , pdownloads blocks... and submited news ) but all things are ok in LOCAL
All about electronics and hardware:
HardWare Freaks!

3
Bender
Re: MySQL error when transfering from local to server
  • 2005/11/15 16:40

  • Bender

  • Home away from home

  • Posts: 1899

  • Since: 2003/3/10


I experienced the very same thing when i did the new wf-projects website. However i went and removed the "DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci" parts (not the trailing ';') and it worked for me when importing the sqldump to my older 4.x mysql.
Sorry, this signature is experiencing technical difficulties. We will return you to the sheduled signature as soon as possible ...

4
saeed
Re: MySQL error when transfering from local to server
  • 2005/11/15 18:37

  • saeed

  • Not too shy to talk

  • Posts: 106

  • Since: 2004/9/27


danke

I will try it and report back...
All about electronics and hardware:
HardWare Freaks!

5
saeed
Re: MySQL error when transfering from local to server
  • 2005/11/15 18:49

  • saeed

  • Not too shy to talk

  • Posts: 106

  • Since: 2004/9/27


not helped... in addition of pervius error this action generated another error message : There is a chance that you may have found a bug in the SQL parser. Please examine your query closely...


helfen zi mir bitte
All about electronics and hardware:
HardWare Freaks!

6
saeed
Re: MySQL error when transfering from local to server
  • 2005/11/15 18:54

  • saeed

  • Not too shy to talk

  • Posts: 106

  • Since: 2004/9/27


this is one of my tables what shoud exactly I remove from it ?

CREATE TABLE `xoops_bb_categories` (
`cat_id` smallint(3) unsigned NOT NULL auto_increment,
`cat_image` varchar(50) collate utf8_general_ci NOT NULL default '',
`cat_title` varchar(100) collate utf8_general_ci NOT NULL default '',
`cat_description` text collate utf8_general_ci NOT NULL,
`cat_order` smallint(3) unsigned NOT NULL default '0',
`cat_state` int(1) NOT NULL default '0',
`cat_url` varchar(50) collate utf8_general_ci NOT NULL default '',
`cat_showdescript` smallint(3) NOT NULL default '0',
PRIMARY KEY (`cat_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci AUTO_INCREMENT=6 ;
All about electronics and hardware:
HardWare Freaks!

7
Bender
Re: MySQL error when transfering from local to server
  • 2005/11/15 21:15

  • Bender

  • Home away from home

  • Posts: 1899

  • Since: 2003/3/10


You are right it was not that easy i remember now. You will have to remove the other collate statements also.

Use an editor with search and replace to do that:

- replace "collate utf8_general_ci" against nothing
- replace "ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci AUTO_INCREMENT=6 ;" by this: "TYPE=MyISAM;"


Your example needs to look like:

Quote:

CREATE TABLE `xoops_bb_categories` (
`cat_id` smallint( 3 ) unsigned NOT NULL AUTO_INCREMENT ,
`cat_image` varchar( 50 ) NOT NULL default '',
`cat_title` varchar( 100 ) NOT NULL default '',
`cat_description` text NOT NULL ,
`cat_order` smallint( 3 ) unsigned NOT NULL default '0',
`cat_state` int( 1 ) NOT NULL default '0',
`cat_url` varchar( 50 ) NOT NULL default '',
`cat_showdescript` smallint( 3 ) NOT NULL default '0',
PRIMARY KEY ( `cat_id` )
) TYPE = MYISAM



However i donĀ“t have a clue if this will break something in the long run. It worked for me but i am no SQL Expert so if anyone with some knowledge might want to jump in here ...
Sorry, this signature is experiencing technical difficulties. We will return you to the sheduled signature as soon as possible ...

8
saeed
Re: MySQL error when transfering from local to server
  • 2005/11/16 9:00

  • saeed

  • Not too shy to talk

  • Posts: 106

  • Since: 2004/9/27


thanks bender I will try it
All about electronics and hardware:
HardWare Freaks!

9
saeed
Re: MySQL error when transfering from local to server
  • 2005/11/16 9:35

  • saeed

  • Not too shy to talk

  • Posts: 106

  • Since: 2004/9/27




I replaced what you said but another error occured as you see in below :

Im tryed to upload xoops_avatar

but :

CREATE TABLE `xoops_avatar` (
`avatar_id` mediumint( 8 ) unsigned NOT NULL AUTO_INCREMENT ,
`avatar_file` varchar( 30 ) NOT NULL default '',
`avatar_name` varchar( 100 ) NOT NULL default '',
`avatar_mimetype` varchar( 30 ) NOT NULL default '',
`avatar_created` int( 10 ) NOT NULL default '0',
`avatar_display` tinyint( 1 ) unsigned NOT NULL default '0',
`avatar_weight` smallint( 5 ) unsigned NOT NULL default '0',
`avatar_type` char( 1 ) NOT NULL default '',
PRIMARY KEY ( `avatar_id` ) ,
KEY `avatar_type` ( `avatar_type` , `avatar_display` )
) ENGINE = MYISAM DEFAULT CHARSET = latin1 COLLATE = latin1_general_ci AUTO_INCREMENT =1 ;

#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=utf8 COLLATE=utf8_general_ci AUTO_INCREMENT

I think I must replace morethigs... can you say ?

and what should I do with AUTO_INCREMENT=1 or 2 or ..?

like this :
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci AUTO_INCREMENT=2 ;


thanks
All about electronics and hardware:
HardWare Freaks!

10
saeed
Re: MySQL error when transfering from local to server
  • 2005/11/16 9:59

  • saeed

  • Not too shy to talk

  • Posts: 106

  • Since: 2004/9/27


ok ! I finally uploaded the database ... BUT as like as forcing database to compatibile with mysql4.0 in phpmyadmin , the PDdownloads module is showing a blank area... categorys is not exist ! and recent files + top download blocks are missing ! but news 1.4 is now ok and shows posted news ! and main menu is exist

is there a way to fix this ??
All about electronics and hardware:
HardWare Freaks!

Login

Who's Online

402 user(s) are online (59 user(s) are browsing Support Forums)


Members: 0


Guests: 402


more...

Donat-O-Meter

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

Latest GitHub Commits