Mambo & MySql Connection ERROR

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Mambo & MySql Connection ERROR

Postby mophsy » 14. July 2005 01:23

Hi,

I want you to help me in a big problem! My Xampp is running smooth. I didnt have any problem with it.
I installed Mambo CMS on my Xampp directory and everithing was ok. I worked 3 weeks on a portal for my community and when i exported the data base to the my hosting server was a total error!

I thought it was this because of some securities on that server ie. safe-mode=on; register_globals=on;

I tried this: i downloaded MSAS [Mambo Stand Alone Server] for me to work and i installed Mambo ->smooth. I exported the data base to my hosting server = NO ERRORS!

I cleaned the data base in MSAS and tried to import the one that i worked in Xampp => ERROR.

The problem is with MySQL connection. I dont know at all PHP, MySQL a.s.o. I worked 3 weeks on that portal and i want somehow not to work the portal again. Please help!!!

I want to remain also on Xampp BUT not to have errors on my MySQL connection, because is the most user friendly Apache Server that i found and is very easy to me to work in it!

Below is the error that i encounter all the time:

Code: Select all
 SQL Command:

CREATE TABLE `mos_banner` (
`bid` int( 11 ) NOT NULL AUTO_INCREMENT ,
`cid` int( 11 ) NOT NULL default '0',
`type` varchar( 10 ) COLLATE latin1_general_ci NOT NULL default 'banner',
`name` varchar( 50 ) COLLATE latin1_general_ci NOT NULL default '',
`imptotal` int( 11 ) NOT NULL default '0',
`impmade` int( 11 ) NOT NULL default '0',
`clicks` int( 11 ) NOT NULL default '0',
`imageurl` varchar( 100 ) COLLATE latin1_general_ci NOT NULL default '',
`clickurl` varchar( 200 ) COLLATE latin1_general_ci NOT NULL default '',
`date` datetime default NULL ,
`showBanner` tinyint( 1 ) NOT NULL default '0',
`checked_out` tinyint( 1 ) NOT NULL default '0',
`checked_out_time` datetime NOT NULL default '0000-00-00 00:00:00',
`editor` varchar( 50 ) COLLATE latin1_general_ci default NULL ,
`custombannercode` text COLLATE latin1_general_ci,
PRIMARY KEY ( `bid` ) ,
KEY `viewbanner` ( `showBanner` )
) ENGINE = MYISAM DEFAULT CHARSET = latin1 COLLATE = latin1_general_ci AUTO_INCREMENT =3


MySQL said:

#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 latin1_general_ci NOT NULL default 'banner',
  `name`


I suspect is smth with a connection with the database.

Please, if you can, help me...not to start over a 3 weeks project worked almost day and nights!

Thanks in advanced!
mophsy
 
Posts: 4
Joined: 14. July 2005 01:06

Postby Dave_L » 14. July 2005 01:55

According to the MySQL manual, it looks like whenever you use COLLATE, it needs to be preceded by CHARACTER SET (or CHARSET):

http://dev.mysql.com/doc/mysql/en/charset-examples.html (see Example 1)

But since you're specifying a default CHARSET/COLLATE for the table as a whole, I think you can simply get rid of the COLLATE clauses for the individual columns.
Last edited by Dave_L on 14. July 2005 02:01, edited 1 time in total.
User avatar
Dave_L
 
Posts: 212
Joined: 23. October 2004 00:43

Postby mophsy » 14. July 2005 01:56

Oh my God!!!!!

I solved the problem! I cheked : MySQL compatibility 4.0 and eliminate all the "latin1_general_ci" from the table structure:

Results: Command Succesfully executed!

I wanted to share this for others to know if they will have the same problem!

Love MAMBO & XAMPP!!!


Dave_l

Thanks for being so prompt!!!!
mophsy
 
Posts: 4
Joined: 14. July 2005 01:06


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 200 guests