Page 1 of 1

SQL script error on new install

Posted: Thu Feb 06, 2014 7:40 pm
by WStemple
Script URL: http://partnerstech.com/heskhelpdesk/in ... nstall.php
Version of script: 2.5.2
Hosting company:
URL of phpinfo.php: could not locate it
URL of session_test.php: could not locate it
What terms did you try when SEARCHING for a solution: SQL INSTALL ERROR

Write your message below:
Attempting to do fresh install for first time and I am getting a SQL syntax error on the CREATE TABLE statement(s). The following is from the error message that is displayed:
Can't execute SQL: CREATE TABLE `hesk_attachments` ( `att_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, `ticket_id` varchar(13) NOT NULL DEFAULT '', `saved_name` varchar(255) NOT NULL DEFAULT '', `real_name` varchar(255) NOT NULL DEFAULT '', `size` int(10) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`att_id`), KEY `ticket_id` (`ticket_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
MySQL said:
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_unicode_ci' at line 9

I did see that there have been some other similar error, but it looked as if the responding person accessed the problem site remotely and fixed it.

Re: SQL script error on new install

Posted: Fri Feb 07, 2014 1:44 pm
by Klemen
This happens because your server has a very old version of MySQL installed ("ENGINE" was added in MySQL 4.0.18 (for 4.0) and 4.1.2, so your server is running at least 10 years old version of MySQL).

There may be a work-around for it, but I strongly suggest that you ask your hosting company to update the MySQL on the server. Running a server with such an old version is not secure at all as it contains many known bugs.

Re: SQL script error on new install

Posted: Tue Feb 11, 2014 3:35 pm
by WStemple
That is what I thought. I think I have narrowed it down to the COLLATE part of the CREATE TABLE. If I take the SQL and drop that, it does work. I think I can live w/o the COLLATE.

Your thoughts on this? The current server version is at 4.0.24-nt

Re: SQL script error on new install

Posted: Tue Feb 11, 2014 3:42 pm
by Klemen
I wouldn't rely on such an old MySQL version, it just calls for trouble.

My honest recommendation would be to upgrade MySQL.

Re: SQL script error on new install

Posted: Tue Feb 11, 2014 4:22 pm
by WStemple
I will asking my hosting company if they have plans to do any upgrade.