SQL script error on new install

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
WStemple
Posts: 3
Joined: Thu Feb 06, 2014 6:23 pm

SQL script error on new install

Post 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.
Klemen
Site Admin
Posts: 10147
Joined: Fri Feb 11, 2005 4:04 pm

Re: SQL script error on new install

Post 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.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
WStemple
Posts: 3
Joined: Thu Feb 06, 2014 6:23 pm

Re: SQL script error on new install

Post 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
Klemen
Site Admin
Posts: 10147
Joined: Fri Feb 11, 2005 4:04 pm

Re: SQL script error on new install

Post 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.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
WStemple
Posts: 3
Joined: Thu Feb 06, 2014 6:23 pm

Re: SQL script error on new install

Post by WStemple »

I will asking my hosting company if they have plans to do any upgrade.
Post Reply